//PascalABC.NET 3.2 сборка 1318
Const
n=3;
m=2;
Var
ma:array[1..n,1..m] of integer;
i,j,min:integer;
begin
for i:=1 to n do
begin
min:=integer.MaxValue;
for j:=1 to m do
begin
readln(ma[i,j]);
if ma[i,j] end;
for j:=1 to m do
if ma[i,j]=min then ma[i,j]:=0;
end;
writeln('Final matrix:');
for i:=1 to n do
begin
for j:=1 to m do
write(ma[i,j]:4);
writeln;
end;
end.