stock = {}

for _ in range(int(eval(input()))):

  s = eval(input())

  try:

    stock[s] += 1

  except KeyError:

    stock[s] = 1

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

stock = []

for _ in range(n):

  stock.append(eval(input()))

print((len(set(stock))))

stock = {}
for _ in range(int(eval(input()))):
    s = eval(input())
    try:
        stock[s] += 1
    except KeyError:
        stock[s] = 1
print((len(stock)))

n = int(eval(input()))
stock = []
for _ in range(n):
    stock.append(eval(input()))
print((len(set(stock))))

-stock = {} -for _ in range(int(eval(input()))): -    s = eval(input()) -    try: -        stock[s] += 1 -    except KeyError: -        stock[s] = 1 -print((len(stock))) +n = int(eval(input())) +stock = [] +for _ in range(n): +    stock.append(eval(input())) +print((len(set(stock))))