program exs;
var a : array [1..1000] of integer;
n, i : integer;
procedure qsort(l, r: integer);
var i, j, key, buf : integer;
begin
i := l;
j:= r;
key:=a[(l+r) div 2];
repeat
while a[i] < key do inc(i);
while a[j] > key do dec(j);
if i<=j then begin<br> buf:=a[i];
a[i]:=a[j];
a[j]:=buf;
inc(i);
dec(j);
end;
until (i>j);
if (l < j) then qsort(l, j);
if (i < r) then qsort(i, r);
end;
begin
readln(n);
for i:= 1 to n do begin
read(a[i]);
end;
qsort(1, n);
for i:=1 to n do begin
write(a[i], ' ');
end;
end.