N=int(eval(input()))

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

import collections

table=collections.defaultdict(int)

for i in range(N):

  table[d[i]]+=1

print((len(list(table.values()))))
N = int(eval(input()))

d = set()

for i in range(N):

  a = eval(input())

  d.add(a)

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

table = collections.defaultdict(int)
for i in range(N):
    table[d[i]] += 1
print((len(list(table.values()))))

N = int(eval(input()))
d = set()
for i in range(N):
    a = eval(input())
    d.add(a)
print((len(d)))

-d = [int(eval(input())) for i in range(N)] -import collections - -table = collections.defaultdict(int) +d = set() -    table[d[i]] += 1 -print((len(list(table.values())))) +    a = eval(input()) +    d.add(a) +print((len(d)))