N = int(eval(input()))

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



man=1

cnt=0

man_list=[0]*N



A.sort()

A += [0]



for a in A:

  if a != man:

    man_list[man-1] = cnt

    man = a

    cnt=0

  cnt+=1



print((*man_list))
N = int(eval(input()))

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



man_list=[0]*N



for a in A:

  man_list[a-1] += 1



print((*man_list))
N = int(eval(input()))
A = list(map(int, input().split()))
man = 1
cnt = 0
man_list = [0] * N
A.sort()
A += [0]
for a in A:
    if a != man:
        man_list[man - 1] = cnt
        man = a
        cnt = 0
    cnt += 1
print((*man_list))

N = int(eval(input()))
A = list(map(int, input().split()))
man_list = [0] * N
for a in A:
    man_list[a - 1] += 1
print((*man_list))

-man = 1 -cnt = 0 -A.sort() -A += [0] -    if a != man: -        man_list[man - 1] = cnt -        man = a -        cnt = 0 -    cnt += 1 +    man_list[a - 1] += 1