import copy

import math

n=int(eval(input()))

x=[list() for a in range(n)]

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

for t in y:

    x[t-1].append("a")

for s in x:

    print((len(s))) 
n = int(eval(input()))

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

li.sort(reverse = True)

count = 0

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

    count = 0

    while True:

        if li:

            if li[-1]==i:

                count+=1

                li.pop()

            else:

                break

        else:

            break

    print(count)
import copy
import math

n = int(eval(input()))
x = [list() for a in range(n)]
y = list(map(int, input().split()))
for t in y:
    x[t - 1].append("a")
for s in x:
    print((len(s)))

n = int(eval(input()))
li = list(map(int, input().split()))
li.sort(reverse=True)
count = 0
for i in range(1, n + 1):
    count = 0
    while True:
        if li:
            if li[-1] == i:
                count += 1
                li.pop()
            else:
                break
        else:
            break
    print(count)

-import copy -import math - -x = [list() for a in range(n)] -y = list(map(int, input().split())) -for t in y: -    x[t - 1].append("a") -for s in x: -    print((len(s))) +li = list(map(int, input().split())) +li.sort(reverse=True) +count = 0 +for i in range(1, n + 1): +    count = 0 +    while True: +        if li: +            if li[-1] == i: +                count += 1 +                li.pop() +            else: +                break +        else: +            break +    print(count)