Var f:text; ars:array of string; s,s1:string; min,n,i:integer; begin n:=1; min:=integer.MaxValue; assign(f,'text.txt'); reset(f); while not(Eof(f)) do begin readln(f,s); s1:=s; s:=s.Trim; i:=1; while i<>length(s) do if (s[i]=' ') and (s[i+1]=' ') then delete(s,i,1) else inc(i); if ((s.split).length<=min) and ((s.split).length<>0) then begin if (s.split).length=min then begin inc(n); setlength(ars,n); ars[n-1]:=s1; end else begin n:=1; setlength(ars,n); ars[n-1]:=s1; end; min:=(s.split).length; end; end; close(f); assign(f,'text1.txt'); rewrite(f); for i:=0 to n-1 do writeln(f,ars[i]); close(f); end.