from collections import defaultdict



n = int(eval(input()))

d = [int(eval(input())) for i in range(n)]



dict = defaultdict(int)

for i in d:

    dict[i] += 1

print((len(dict)))

n = int(eval(input()))

d = {int(eval(input())) for i in range(n)}

print((len(d)))

from collections import defaultdict

n = int(eval(input()))
d = [int(eval(input())) for i in range(n)]
dict = defaultdict(int)
for i in d:
    dict[i] += 1
print((len(dict)))

n = int(eval(input()))
d = {int(eval(input())) for i in range(n)}
print((len(d)))

-from collections import defaultdict - -d = [int(eval(input())) for i in range(n)] -dict = defaultdict(int) -for i in d: -    dict[i] += 1 -print((len(dict))) +d = {int(eval(input())) for i in range(n)} +print((len(d)))