program z1319;
uses crt;
var f:text;
i: byte;
max, n: integer;
begin
Assign(f, 'c:\work\text.txt');
ReSet(f);
i:=0;
while not Eof(f) do begin
max:= -MaxInt;
while not Eoln(f) do begin
read(f, n);
if n>max then max:=n;
end;
readln(f);
inc(i);
writeln(i, ' max=', max);
end;
Close (f);
readln;
End.