Program Tema;
uses Sysutils;
const C_FNAME='date.txt';
var tfIn:TextFile;
s:string;
max,counter,nr_caractere:integer;
begin
max:=0;
counter:=0;
nr_caractere:=0;
AssignFile(tfIn,C_FNAME);
while not eof(tfIn) do
begin
readln(tfIn,s);
writeln(s);
writeln(Length(s));
nr_caractere:=nr_caractere+Length(s);
if(Length(s)>max)
max:=s;
counter:=counter+1;
end;
tfIn.close();
writeln(counter,' ',nr_caractere,' ',max);
end.