a = int(eval(input()))

b = [0] * a



for c in map(int, input().split()):

    b[c-1] = b[c-1] + 1



print(('\n'.join(map(str, b))))

社員数 = int(eval(input()))

部下数 = [0] * 社員数



for 上司 in map(int, input().split()):

    部下数[上司-1] += 1



print(('\n'.join(map(str, 部下数))))

a = int(eval(input()))
b = [0] * a
for c in map(int, input().split()):
    b[c - 1] = b[c - 1] + 1
print(("\n".join(map(str, b))))

社員数 = int(eval(input()))
部下数 = [0] * 社員数
for 上司 in map(int, input().split()):
    部下数[上司 - 1] += 1
print(("\n".join(map(str, 部下数))))

-a = int(eval(input())) -b = [0] * a -for c in map(int, input().split()): -    b[c - 1] = b[c - 1] + 1 -print(("\n".join(map(str, b)))) +社員数 = int(eval(input())) +部下数 = [0] * 社員数 +for 上司 in map(int, input().split()): +    部下数[上司 - 1] += 1 +print(("\n".join(map(str, 部下数))))