from collections import Counter, deque

n = int(eval(input()))

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

c = Counter(a)

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

    if i in list(c.keys()):

        print((c[i]))

    else:

        print((0))

n = int(eval(input()))

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

buka = [0]*n

for i in range(n-1):

    buka[a[i]-1] += 1

for i in range(n):

    print((buka[i]))
from collections import Counter, deque

n = int(eval(input()))
a = deque(list(map(int, input().split())))
c = Counter(a)
for i in range(1, n + 1):
    if i in list(c.keys()):
        print((c[i]))
    else:
        print((0))

n = int(eval(input()))
a = list(map(int, input().split()))
buka = [0] * n
for i in range(n - 1):
    buka[a[i] - 1] += 1
for i in range(n):
    print((buka[i]))

-from collections import Counter, deque - -a = deque(list(map(int, input().split()))) -c = Counter(a) -for i in range(1, n + 1): -    if i in list(c.keys()): -        print((c[i])) -    else: -        print((0)) +a = list(map(int, input().split())) +buka = [0] * n +for i in range(n - 1): +    buka[a[i] - 1] += 1 +for i in range(n): +    print((buka[i]))