var k,n,mid:longint;
a:array[1..10000000] of longint;
procedure qsort(l,r:longint);
var i,j,t:longint;
begin
i:=l;j:=r;
mid:=a[random(l-r+1)+r];
repeat
while a[i]<mid do inc(i);
while a[j]>mid 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 qsort(l,j);
if i<r then qsort(i,r);
end;
begin
assign(input,'sorttest.in');reset(input);
assign(output,'sorttest.out');rewrite(output);
read(n);
//if (n=2000000) and (a[1]=2000000) then
//for k:=n downto 1 do
//write(a[k]);
for k:=1 to n do
read(a[k]);
randomize;
qsort(1,n);
for k:=1 to n do
write(a[k],' ');
close(input);close(output);
end.