//Pascal ABC.NET 3.1 сборка 1219
Const
m=5;
n=4;
Var
ma:array[1..n,1..m]of integer;
i,j,k:integer;
begin
k:=0;
randomize;
writeln('Matrix:');
for i:=1 to n do
begin
for j:=1 to m do
begin
ma[i,j]:=random(10);
write(ma[i,j]:4);
end;
writeln;
end;
for j:=1 to m do
begin
for i:=1 to n do
if ma[i,j] mod 2<>0 then inc(k);
if k=n then
begin
writeln(j);
exit;
end;
k:=0;
end;
writeln('0');
end.