2025-08-19 20:55:43 +09:00

5 lines
140 B
Python

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