num_sub  = int(eval(input()))

sub_boss = input().split()



num_boss = [0]*(num_sub)



for i in sub_boss:

	i = int(i)

	num_boss[i-1] = num_boss[i-1] + 1



for i in num_boss:

  print(i)
num_sub  = int(eval(input()))

sub_boss = input().split()



num_boss = [0]*(num_sub)



for i in sub_boss:

	num_boss[int(i)-1] += 1



for i in num_boss:

	print(i)
num_sub = int(eval(input()))
sub_boss = input().split()
num_boss = [0] * (num_sub)
for i in sub_boss:
    i = int(i)
    num_boss[i - 1] = num_boss[i - 1] + 1
for i in num_boss:
    print(i)

num_sub = int(eval(input()))
sub_boss = input().split()
num_boss = [0] * (num_sub)
for i in sub_boss:
    num_boss[int(i) - 1] += 1
for i in num_boss:
    print(i)

-    i = int(i) -    num_boss[i - 1] = num_boss[i - 1] + 1 +    num_boss[int(i) - 1] += 1