n = int(eval(input()))

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



sub_nums = [0] * n

for a in a_list:

    sub_nums[a - 1] += 1



for sub_num in sub_nums:

    print(sub_num)

n = int(eval(input()))

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



sub_nums = [0] * n

for a in a_list:

    sub_nums[a - 1] += 1



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

# for sub_num in sub_nums:

#     print(sub_num)

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

n = int(eval(input()))
a_list = list(map(int, input().split()))
sub_nums = [0] * n
for a in a_list:
    sub_nums[a - 1] += 1
print(("\n".join(map(str, sub_nums))))
# for sub_num in sub_nums:
#     print(sub_num)

-for sub_num in sub_nums: -    print(sub_num) +print(("\n".join(map(str, sub_nums)))) +# for sub_num in sub_nums: +#     print(sub_num)