n = int(eval(input()))

s = []

ans = n

for i in range(n):

    s.append(eval(input()))

s = sorted(s)

for i in range(1,n):

    if s[i] == s[i-1]:

        ans-=1

print(ans)
n = int(eval(input()))

s = set([])

for i in range(n):

    s.add(eval(input()))

print((len(s)))
n = int(eval(input()))
s = []
ans = n
for i in range(n):
    s.append(eval(input()))
s = sorted(s)
for i in range(1, n):
    if s[i] == s[i - 1]:
        ans -= 1
print(ans)

n = int(eval(input()))
s = set([])
for i in range(n):
    s.add(eval(input()))
print((len(s)))

-s = [] -ans = n +s = set([]) -    s.append(eval(input())) -s = sorted(s) -for i in range(1, n): -    if s[i] == s[i - 1]: -        ans -= 1 -print(ans) +    s.add(eval(input())) +print((len(s)))