import collections

n = int(eval(input()))

a = [int(i) for i in input().split()]

a.sort()

c = collections.Counter(a)

l = [0]*n

for i,x in list(c.items()):

    l[i-1] = x

    

for i in l:

    print(i)
n = int(eval(input()))

a = [int(i) for i in input().split()]

l = [0]*(n+1)

for i in a:

    l[i] += 1



for i in l[1:]:

    print(i)
import collections

n = int(eval(input()))
a = [int(i) for i in input().split()]
a.sort()
c = collections.Counter(a)
l = [0] * n
for i, x in list(c.items()):
    l[i - 1] = x
for i in l:
    print(i)

n = int(eval(input()))
a = [int(i) for i in input().split()]
l = [0] * (n + 1)
for i in a:
    l[i] += 1
for i in l[1:]:
    print(i)

-import collections - -a.sort() -c = collections.Counter(a) -l = [0] * n -for i, x in list(c.items()): -    l[i - 1] = x -for i in l: +l = [0] * (n + 1) +for i in a: +    l[i] += 1 +for i in l[1:]: