num = int(eval(input()))

boss = input().split()



ans_list = [0] * num



for i_boss in boss:

    ans_list[int(i_boss)-1] += 1

a = list([str(x) for x in ans_list])

print(('\n'.join(a)))

num = int(eval(input()))

boss = input().split()

ans_list = [0] * num

for i_boss in boss:

    ans_list[int(i_boss)-1] += 1

print(('\n'.join(list(map(str, ans_list)))))
num = int(eval(input()))
boss = input().split()
ans_list = [0] * num
for i_boss in boss:
    ans_list[int(i_boss) - 1] += 1
a = list([str(x) for x in ans_list])
print(("\n".join(a)))

num = int(eval(input()))
boss = input().split()
ans_list = [0] * num
for i_boss in boss:
    ans_list[int(i_boss) - 1] += 1
print(("\n".join(list(map(str, ans_list)))))

-a = list([str(x) for x in ans_list]) -print(("\n".join(a))) +print(("\n".join(list(map(str, ans_list)))))