n = int(input())

S = list(map(int,input().strip().split(' ')))



def counting_sort(S,k):

    C = [0]*(k+1)

    B = [0]*len(S)

    for v in S:

        C[v] += 1

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

        C[i] += C[i-1]

    for i in range(len(S)):

        B[C[S[i]]-1] = S[i]

        C[S[i]] -= 1

    return B



B = counting_sort(S,10000)

for b in B:

    print(b, end=' ')
def counting_sort(a,k):

    C = []

    for i in range(k):

        C.append(0)

    for ai in a:

        C[ai] += 1

    s = 0

    for i in range(k):

        s += C[i]

        C[i] = s

    b = []

    for i in range(len(a)):

        b.append(None)

    p = 0

    for i in range(k):

        while p < C[i]:

            b[p] = i

            p += 1

    return b





n = int(input())

a = list(map(int,input().split(' ')))

print(' '.join(map(str,counting_sort(a,10000))))
n = int(input())
S = list(map(int, input().strip().split(" ")))


def counting_sort(S, k):
    C = [0] * (k + 1)
    B = [0] * len(S)
    for v in S:
        C[v] += 1
    for i in range(1, k + 1):
        C[i] += C[i - 1]
    for i in range(len(S)):
        B[C[S[i]] - 1] = S[i]
        C[S[i]] -= 1
    return B


B = counting_sort(S, 10000)
for b in B:
    print(b, end=" ")

def counting_sort(a, k):
    C = []
    for i in range(k):
        C.append(0)
    for ai in a:
        C[ai] += 1
    s = 0
    for i in range(k):
        s += C[i]
        C[i] = s
    b = []
    for i in range(len(a)):
        b.append(None)
    p = 0
    for i in range(k):
        while p < C[i]:
            b[p] = i
            p += 1
    return b


n = int(input())
a = list(map(int, input().split(" ")))
print(" ".join(map(str, counting_sort(a, 10000))))

-n = int(input()) -S = list(map(int, input().strip().split(" "))) +def counting_sort(a, k): +    C = [] +    for i in range(k): +        C.append(0) +    for ai in a: +        C[ai] += 1 +    s = 0 +    for i in range(k): +        s += C[i] +        C[i] = s +    b = [] +    for i in range(len(a)): +        b.append(None) +    p = 0 +    for i in range(k): +        while p < C[i]: +            b[p] = i +            p += 1 +    return b -def counting_sort(S, k): -    C = [0] * (k + 1) -    B = [0] * len(S) -    for v in S: -        C[v] += 1 -    for i in range(1, k + 1): -        C[i] += C[i - 1] -    for i in range(len(S)): -        B[C[S[i]] - 1] = S[i] -        C[S[i]] -= 1 -    return B - - -B = counting_sort(S, 10000) -for b in B: -    print(b, end=" ") +n = int(input()) +a = list(map(int, input().split(" "))) +print(" ".join(map(str, counting_sort(a, 10000))))