def main():
n = int(input())
A = list(map(int, input().split()))
A = mergesort(A)
for i in A:
print(i, end = ' ')
def mergesort(A):
if len(A) == 1:
return A
mid = len(A) // 2
left = mergesort(A[:mid])
right = mergesort(A[mid:])
return merge(left, right)
#合并两个有序数组
def merge(A, B):
p1, p2 = 0, 0
res = []
while p1 < len(A) and p2 < len(B):
if A[p1] < B[p2]:
res.append(A[p1])
p1 += 1
else:
res.append(B[p2])
p2 += 1
res += A[p1:]
res += B[p2:]
return res
main()