program gg;
var i,n,max:integer;
a:array of integer[1..10];
begin
readln(a[i]);
for i:=1 to 10 do
begin
writeln(a[i],' ');
end;
n:=a[6];
a[6]:=a[9];
a[9]:=n;
max:=a[1];
for i:=2 to 10 do
if a[i]>max then
max:=a[i];
writeln('max element=',max);
readln
end.