program azix; uses crt; type katal = record mar: string[15]; str: string[15]; fir: string[15]; met: string[15]; raz: string[15]; end; const t=10; var stop:boolean; k:integer; book:katal; f:text; i,j,n:integer; a:array [1..100]of katal; begin clrscr; assign(f,'c:\kat.pas'); reset(f); for i:=1 to t do with a[i] do begin readln(f,mar,str,fir,met,raz); i:=i+1; end; repeat stop:= true; for k:=1 to 3 do if a[k].str>a[k+1].str then begin book:=a[k]; a[k]:=a[k+1]; a[k+1]:=book; stop:=false end until stop; for k:=1 to t do writeln(a[k].mar,a[k].str,a[k].fir,a[k].met,a[k].raz); end.