program quicksort;
var
a:array[1..100000] of longint;
i,n,s:longint;
procedure qs(s,t:longint);
var
i,j,u:longint;
begin
if s<t then
begin
i:=s;
j:=t;
u:=a[s];
repeat
while (i<j) and (u<a[j]) do dec(j);
if (i<j) then begin a[i]:=a[j]; inc(i); end;
while (i<j) and (a[i]<u) do inc(i);
if (i<j) then begin a[j]:=a[i]; dec(j); end;
until i=j;
a[i]:=u;
qs(s,i-1);
qs(i+1,t);
end;
end;
begin
read(n);
for i:=1 to n do read(a[i]);
qs(1,n);
for i:=1 to n-1 do write(a[i],' ');
writeln(a[n]);
end.