def counting_sort(A):

    # init

    bucket = {}

    for i in range(10000):

        bucket[i] = 0



    for a in A:

        bucket[a] += 1







    k = 0

    for i in range(10000):

        for j in range(bucket[i]):

            A[k] = i

            k += 1



n = int(eval(input()))

A = list(map(int, input().split()))



counting_sort(A)



print((*A))

def counting_sort(A):

    # init

    bucket = []

    for i in range(10000):

        bucket.append(0)



    for a in A:

        bucket[a] += 1



    k = 0

    for i in range(10000):

        for j in range(bucket[i]):

            A[k] = i

            k += 1



n = int(eval(input()))

A = list(map(int, input().split()))



counting_sort(A)



print((*A))

def counting_sort(A):
    # init
    bucket = {}
    for i in range(10000):
        bucket[i] = 0
    for a in A:
        bucket[a] += 1
    k = 0
    for i in range(10000):
        for j in range(bucket[i]):
            A[k] = i
            k += 1


n = int(eval(input()))
A = list(map(int, input().split()))
counting_sort(A)
print((*A))

def counting_sort(A):
    # init
    bucket = []
    for i in range(10000):
        bucket.append(0)
    for a in A:
        bucket[a] += 1
    k = 0
    for i in range(10000):
        for j in range(bucket[i]):
            A[k] = i
            k += 1


n = int(eval(input()))
A = list(map(int, input().split()))
counting_sort(A)
print((*A))

-    bucket = {} +    bucket = [] -        bucket[i] = 0 +        bucket.append(0)