# -*- coding:utf-8 -*-





def countingSort(A, B, k, n):

    C = [0] * (k+1)



    for i in range(1, n + 1):

        C[A[i]] += 1



    for j in range(1, k + 1):

        C[j] = C[j] + C[j - 1]



    for j in range(n, 0, -1):

        B[C[A[j]]] = A[j]

        C[A[j]] -= 1





if __name__ == "__main__":

    n = int(eval(input()))

    lst = [int(val) for val in input().split()]

    lst.insert(0, 0)

    result = [0] * (n + 1)

    k = max(lst)

    countingSort(lst, result, k, n)

    result.pop(0)

    print((" ".join([str(val) for val in result])))
# -*- coding:utf-8 -*-





def countingSort(lst, n):

    cnt_lst = [0] * (max(lst)+1)



    for i in range(0, n):

        cnt_lst[lst[i]] += 1



    i = 0

    result = []

    for j, cnt in enumerate(cnt_lst):

        for _ in range(0, cnt):

            result.append(j)

    return result





if __name__ == "__main__":

    n = int(eval(input()))

    lst = [int(val) for val in input().split()]

    result = countingSort(lst, n)

    print((" ".join([str(val) for val in result])))
# -*- coding:utf-8 -*-
def countingSort(A, B, k, n):
    C = [0] * (k + 1)
    for i in range(1, n + 1):
        C[A[i]] += 1
    for j in range(1, k + 1):
        C[j] = C[j] + C[j - 1]
    for j in range(n, 0, -1):
        B[C[A[j]]] = A[j]
        C[A[j]] -= 1


if __name__ == "__main__":
    n = int(eval(input()))
    lst = [int(val) for val in input().split()]
    lst.insert(0, 0)
    result = [0] * (n + 1)
    k = max(lst)
    countingSort(lst, result, k, n)
    result.pop(0)
    print((" ".join([str(val) for val in result])))

# -*- coding:utf-8 -*-
def countingSort(lst, n):
    cnt_lst = [0] * (max(lst) + 1)
    for i in range(0, n):
        cnt_lst[lst[i]] += 1
    i = 0
    result = []
    for j, cnt in enumerate(cnt_lst):
        for _ in range(0, cnt):
            result.append(j)
    return result


if __name__ == "__main__":
    n = int(eval(input()))
    lst = [int(val) for val in input().split()]
    result = countingSort(lst, n)
    print((" ".join([str(val) for val in result])))

-def countingSort(A, B, k, n): -    C = [0] * (k + 1) -    for i in range(1, n + 1): -        C[A[i]] += 1 -    for j in range(1, k + 1): -        C[j] = C[j] + C[j - 1] -    for j in range(n, 0, -1): -        B[C[A[j]]] = A[j] -        C[A[j]] -= 1 +def countingSort(lst, n): +    cnt_lst = [0] * (max(lst) + 1) +    for i in range(0, n): +        cnt_lst[lst[i]] += 1 +    i = 0 +    result = [] +    for j, cnt in enumerate(cnt_lst): +        for _ in range(0, cnt): +            result.append(j) +    return result -    lst.insert(0, 0) -    result = [0] * (n + 1) -    k = max(lst) -    countingSort(lst, result, k, n) -    result.pop(0) +    result = countingSort(lst, n)