n = int(eval(input()))

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



ans = [0]*n



for i in l:

    ans[i-1] += 1



for i in ans:

    print(i)

n = int(eval(input()))

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



ans = [0]*n



for i in l:

    ans[i-1] += 1



print(("\n".join(map(str,ans))))

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

n = int(eval(input()))
l = list(map(int, input().split()))
ans = [0] * n
for i in l:
    ans[i - 1] += 1
print(("\n".join(map(str, ans))))

-for i in ans: -    print(i) +print(("\n".join(map(str, ans))))