program asd;
uses crt;
const n=7; m=2;
var q,x:array[1..n,1..n] of integer;
a1,s,i,j,v,f:integer; u:real;
BEGIN
clrscr;
randomize;
for j:=1 to n do BEGIN
for i:=1 to n do BEGIN
x[i,j]:=random(30)+1; write(' ',x[i,j]); end; writeln; end;
writeln;
a1:=x[1,1];
for j:=1 to n do
for i:=1 to n do BEGIN
if x[i,j]>a1 then BEGIN a1:=x[i,j]; f:=j; end;end;
for j:=1 to n do
for i:=1 to n do BEGIN
if x[i,j]=a1 then BEGIN a1:=x[i,j]; f:=j;for i:=1 to n do x[i,j]:=0;
write('no?iea ' ,f); end;end;
writeln('no?iea ' ,f);
writeln;
write('=',a1);
writeln;
for j:=1 to n do BEGIN
for i:=1 to n do write(' ',x[i,j]);
writeln; end;
end.