const nx=100;var T:text; M:array[1..nx] of string; s,d:string;ch:char;var i,p,j:integer;beginassign(T,'D:\1t\sip.txt');reset(T);while not eof(T) do beginReadln(T,s);p:=1;While p>0 do begin i:= i +1;p:=pos(' ',s);if p>0 then M[i]:=copy(s,1,p-1)else M[i]:=s; delete(s,1,p);//writeln(M[i]);end;end;close(T);for ch:='А' to 'Я' do beginfor j:=1 to i do beginif (m[j].Length >0) and (ch = uppercase(copy(m[j],1,1))) then begin //write(ch);writeln(M[j]); M[j]:=''; end;end;end;end.