n = int(eval(input()))

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

list= [0]*n



for i in a:

    list[i-1] += 1



for j in list:

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

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



li = [0]*n



for i in a:

    li[i-1] += 1



#print(li)



for j in li:

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

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

-list = [0] * n +li = [0] * n -    list[i - 1] += 1 -for j in list: +    li[i - 1] += 1 +# print(li) +for j in li: