﻿program permutation;
var i,j : integer;
  a : array [1..3 , 1..3] of integer;
  procedure permute ( var a,b : integer );
   var c : integer;
   begin
   	c:=a;
   	a:=b;
   	b:=c;
  end;
  begin
  	for i := 1 to 3 do 
  	for i:= 1 to 3 do 
  	begin
  		writeln(' donnez les de m[',i,'.',j,'] ');
  		readln (a[i,j]);
    end;
    for i := 1 to 3 do 
    permute ( a[i,i] , a[3-i,i]);
    writeln;
     for i:= 1 to 3 do 
     for j:= 1 to 3 do 
     begin 
     	writeln( a[i,j]);
    end;
    readln;
end.