Program Ex1;
Var A:array[1..100,1..100] of integer;
I,j,n,m,max,k:Integer;
begin
Readln(n,m);
For I:=1 to N do begin;
For j:=1 to M do Read(A[I,j]);
Readln;
end;
for J:=1 to M do begin;
for i:=1 to N do begin;
If a[i,j]>max then begin
Max:=a[i,j];
for i:=1 to N do begin
for J:=1 to M do begin
if a[i,j]=max then begin
Program Ex1;
Var A:array[1..100,1..100] of integer;
I,j,n,m,max,k:Integer;
begin
Readln(n,m);
For I:=1 to N do begin;
For j:=1 to M do Read(A[I,j]);
Readln;
end;
for J:=1 to M do begin;
for i:=1 to N do begin;
If a[i,j]>max then begin
Max:=a[i,j];
end;
end;
end;
for i:=1 to N do begin
for J:=1 to M do begin
if a[i,j]=max then begin