Var a:array[1..5,1..5] of integer;
i,j:integer;
begin
randomize;
for i:=1 to 5 do begin
for j:=1 to 5 do begin
a[i,j]:=random(10)+1;
write(a[i,j],' ');
end;
writeln();
end;
for i:=1 to 5 do begin
for j:=1 to 5 do begin
if j=5 then a[i,j]:=5;
write(a[i,j],' ');
end;
writeln();
end;
end.