N = int(eval(input()))

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

ans = 1

for i in range(N-1):

    if d[i] < d[i+1]:

        ans += 1

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

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

print((len(set(d))))
N = int(eval(input()))
d = sorted([int(eval(input())) for i in range(N)])
ans = 1
for i in range(N - 1):
    if d[i] < d[i + 1]:
        ans += 1
print(ans)

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

-d = sorted([int(eval(input())) for i in range(N)]) -ans = 1 -for i in range(N - 1): -    if d[i] < d[i + 1]: -        ans += 1 -print(ans) +d = [int(eval(input())) for i in range(N)] +print((len(set(d))))