import sys

N = int(eval(input()))

S = [str(s) for s in sys.stdin.read().split()]

print((len(set(S))))
N, *S = open(0)

print((len(set(S))))
import sys

N = int(eval(input()))
S = [str(s) for s in sys.stdin.read().split()]
print((len(set(S))))

N, *S = open(0)
print((len(set(S))))

-import sys - -N = int(eval(input())) -S = [str(s) for s in sys.stdin.read().split()] +N, *S = open(0)