var a:array [1..4,1..6] of real;
b:array [1..6] of real;
i,j:integer;
k:real;
BEGIN
for i:=1 to 4 do
for j:=1 to 6 do
read(a[i,j]);
k:=-maxint;
for j:=1 to 6 do begin
for i:=1 to 4 do
if a[i,j]>k then k:=a[i,j];
b[j]:=k;
k:=-maxint;
end;
writeln();
for i:=1 to 6 do
write(b[i],' ');
end.