n = int(eval(input()))

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

num = [0] * 110

count = 0

for i in range(len(d)):

    num[d[i]]+= 1

for j in num:

    if j >= 1:

        count += 1

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

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



print((len(syu)))
n = int(eval(input()))
d = [int(eval(input())) for i in range(n)]
num = [0] * 110
count = 0
for i in range(len(d)):
    num[d[i]] += 1
for j in num:
    if j >= 1:
        count += 1
print(count)

n = int(eval(input()))
syu = set([int(eval(input())) for i in range(n)])
print((len(syu)))

-d = [int(eval(input())) for i in range(n)] -num = [0] * 110 -count = 0 -for i in range(len(d)): -    num[d[i]] += 1 -for j in num: -    if j >= 1: -        count += 1 -print(count) +syu = set([int(eval(input())) for i in range(n)]) +print((len(syu)))