var
a:array[0..10000]of longint;
n,i:longint;
procedure sort(l,r:longint);
var i,j,m,t:longint;
begin
i:=l;j:=r;m:=a[(l+r)div 2];
repeat
while a[i]<m do inc(i);
while a[j]>m do dec(j);
if i<=j then
begin
t:=a[i];a[i]:=a[j];a[j]:=t;
inc(i);dec(j);
end;
until i>j;
if l<j then sort(l,j);
if i<r then sort(i,r);
end;
begin
assign(input,' sorttest.in');
reset(input);
assign(output,'sorttest.out');
rewrite(output);
readln(n);
for i:=1 to n do read(a[i]);
sort(1,n);
for i:=1 to n do write(a[i],' ');
close(input);close(output);
end.