program pr;
uses crt;
Var i,j,b:integer;
C:array[1..5, 1..5] of integer;
Begin
for i:=1 to 5 do Begin
Writeln;
for j:=1 to 5 do Begin C[i,j]:=random(100); Write(C[i,j],'|'); end;
end;
for i:=1 to 5 do
Begin
b:=C[i,i];
C[i,i]:=C[i,6-i];
C[i,6-i]:=b;
end;
Writeln;
for i:=1 to 5 do Begin
Writeln;
for j:=1 to 5 do Write(C[i,j],'|');
end;
readln;
end.