const g=3;v=5;
var i,j,s,m,mi:integer;
a:array [1..g,1..v] of integer;
begin
for i:=1 to g do
begin
for j:=1 to v do
begin
a[i,j]:=random(21)-10;
write (a[i,j]:5)
end;
writeln
end;
writeln;
for i:=1 to g do
begin
for j:=1 to v do
begin
if (i+j) mod 2=0 then a[i,j]:=555;
write (a[i,j]:5)
end;
writeln
end
end.