from collections import Counter

N = int(eval(input()))

src = [int(eval(input())) for i in range(N)]

ctr = Counter(src)

print((len(list(ctr.items()))))

N = int(eval(input()))

src = [int(eval(input())) for i in range(N)]

print((len(set(src))))
from collections import Counter

N = int(eval(input()))
src = [int(eval(input())) for i in range(N)]
ctr = Counter(src)
print((len(list(ctr.items()))))

N = int(eval(input()))
src = [int(eval(input())) for i in range(N)]
print((len(set(src))))

-from collections import Counter - -ctr = Counter(src) -print((len(list(ctr.items())))) +print((len(set(src))))