Uses crt;
const n=5;
m=5;
var a:array[1..n,1..m] of integer;
i,b,j,k:integer;
begin
randomize;
for i:=1 to n do
for j:=1 to m do
begin
a[i,j]:=random(40)-20;
write(a[i,j]:3);
end;
writeln;
k:=1;
b:=20;
repeat
for i:=k to k do
for j:=1 to m do
if (a[i,j]writeln(b);
inc(k);
b:=20;
until k>n;
end.