n = int(eval(input()))

a = {}

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

    a[i] = []



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

for i in member:

    a[i].append(1)



for j in a:

    print((len(a[j])))
n = int(input())

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



member = [0] * n

for i in a:

    member[i-1] += 1



print(*member, sep='\n')

n = int(eval(input()))
a = {}
for i in range(1, n + 1):
    a[i] = []
member = list(map(int, input().split()))
for i in member:
    a[i].append(1)
for j in a:
    print((len(a[j])))

n = int(input())
a = list(map(int, input().split()))
member = [0] * n
for i in a:
    member[i - 1] += 1
print(*member, sep="\n")

-n = int(eval(input())) -a = {} -for i in range(1, n + 1): -    a[i] = [] -member = list(map(int, input().split())) -for i in member: -    a[i].append(1) -for j in a: -    print((len(a[j]))) +n = int(input()) +a = list(map(int, input().split())) +member = [0] * n +for i in a: +    member[i - 1] += 1 +print(*member, sep="\n")