N = int(eval(input()))

x = set()

for _ in range(N):

    s = eval(input())

    x.add(s)

print((len(x)))
import sys

N = int(eval(input()))

x = set()

for _ in range(N):

    s = sys.stdin.readline()

    x.add(s)

print((len(x)))
N = int(eval(input()))
x = set()
for _ in range(N):
    s = eval(input())
    x.add(s)
print((len(x)))

import sys

N = int(eval(input()))
x = set()
for _ in range(N):
    s = sys.stdin.readline()
    x.add(s)
print((len(x)))

+import sys + -    s = eval(input()) +    s = sys.stdin.readline()