cnt = int(eval(input()))

set1 = set([int(eval(input())) for i in range(cnt)])

print((len(set1)))
n= int(eval(input()))

lst = [0] * (100 + 1)



for i in range(n):

    lst[int(eval(input()))] = 1



ans = 0

for j in lst:

    ans += j

print(ans)

    
cnt = int(eval(input()))
set1 = set([int(eval(input())) for i in range(cnt)])
print((len(set1)))

n = int(eval(input()))
lst = [0] * (100 + 1)
for i in range(n):
    lst[int(eval(input()))] = 1
ans = 0
for j in lst:
    ans += j
print(ans)

-cnt = int(eval(input())) -set1 = set([int(eval(input())) for i in range(cnt)]) -print((len(set1))) +n = int(eval(input())) +lst = [0] * (100 + 1) +for i in range(n): +    lst[int(eval(input()))] = 1 +ans = 0 +for j in lst: +    ans += j +print(ans)