var i, index, n: integer;
A: array of int64;
max: int64;
begin
write('N = ');
readln(N);
setlength(A, N);
writeln();
write('1: ');
readln(A[0]);
max := A[0];
index := 0;
for i := 1 to N - 1 do
begin
write(i + 1, ': ');
readln(A);
if A > max then
begin
max := A;
index := i
end
end;
writeln();
A[index] := 0;
for i := 0 to N - 1 do
writeln(i + 1, ': ', A)
end.