Program z1;
var a:array[1..100] of integer;
i,n,k,mi,miu:integer;
begin
assign(input,'in.txt');
reset(input);
readln(n);
for i:=1 to n do begin
read(a[i]);
end;
close(input);
mi:=a[1];miu:=1;
for i:=1 to n do begin
if a[i] mi:=a[i];miu:=i
end;
end;
i:=miu;
while i a[i]:=a[i+1];
i:=i+1
end;
assign(output,'out.txt');
rewrite(output);
for i:=1 to n-1 do begin
write(a[i],' ')
end;
close(output)
end.