var a:array[1..1000] of longint; i,j,k,t,z:longint; begin while not eof do begin readln(z); for i:=1 to z do read(a[i]); for i:=1 to z-1 do begin k:=i; for j:=i+1 to z do if a[j]<a[k] then k:=j; if i<>k then begin t:=a[i]; a[i]:=a[k]; a[k]:=t; end; end; for i:=1 to z do write(a[i],' '); end; end.