N = int(eval(input()))



lis = [eval(input()) for _ in range(N)]

print((len(set(lis))))
import sys

def input(): return sys.stdin.readline().strip()

def mapint(): return list(map(int, input().split()))

sys.setrecursionlimit(10**9)



N = int(eval(input()))

Ss = [eval(input()) for _ in range(N)]

print((len(set(Ss[:N]))))
N = int(eval(input()))
lis = [eval(input()) for _ in range(N)]
print((len(set(lis))))

import sys


def input():
    return sys.stdin.readline().strip()


def mapint():
    return list(map(int, input().split()))


sys.setrecursionlimit(10**9)
N = int(eval(input()))
Ss = [eval(input()) for _ in range(N)]
print((len(set(Ss[:N]))))

+import sys + + +def input(): +    return sys.stdin.readline().strip() + + +def mapint(): +    return list(map(int, input().split())) + + +sys.setrecursionlimit(10**9) -lis = [eval(input()) for _ in range(N)] -print((len(set(lis)))) +Ss = [eval(input()) for _ in range(N)] +print((len(set(Ss[:N]))))