N=int(eval(input()))

K=[]

z=0

for x in range(N):

    k=eval(input())

    K.append(k)

T=set(K)

y=len(T)

print(y)

import sys

input=sys.stdin.readline

N=int(eval(input()))

K=[]

z=0

for x in range(N):

    k=eval(input())

    K.append(k)

T=set(K)

y=len(T)

print(y)



N = int(eval(input()))
K = []
z = 0
for x in range(N):
    k = eval(input())
    K.append(k)
T = set(K)
y = len(T)
print(y)

import sys

input = sys.stdin.readline
N = int(eval(input()))
K = []
z = 0
for x in range(N):
    k = eval(input())
    K.append(k)
T = set(K)
y = len(T)
print(y)

+import sys + +input = sys.stdin.readline