var a:array[1..10]of integer;
i,max:integer;
begin
for i:=1 to 10 do readln(a[i]);
max:=a[1];
for i:=2 to 10 do if max<a[i] then max:=a[i];
for i:=1 to 10 do if a[i]>0 then a[i]:=max;
writeln;
for i:=1 to 10 do write(a[i],' ');
end.
var a:array[1..10]of integer;
i,max:integer;
begin
for i:=1 to 10 do readln(a[i]);
max:=a[1];
for i:=2 to 10 do if max<a[i] then max:=a[i];
for i:=1 to 10 do if a[i]>0 then a[i]:=max;
writeln;
for i:=1 to 10 do write(a[i],' ');
end.