2025-07-06 17:49:27 +09:00

5 lines
136 B
Python

from collections import Counter
input()
count = Counter(input().split())
input()
print(' '.join(str(count[k]) for k in input().split()))