N = int(eval(input()))

A = [int(Ai) for Ai in input().split()]

cards = len(set(A))

print((cards if cards % 2 == 1 else cards - 1))
eval(input())

cards = len(set([Ai for Ai in input().split()]))

print((cards if cards % 2 == 1 else cards - 1))
N = int(eval(input()))
A = [int(Ai) for Ai in input().split()]
cards = len(set(A))
print((cards if cards % 2 == 1 else cards - 1))

eval(input())
cards = len(set([Ai for Ai in input().split()]))
print((cards if cards % 2 == 1 else cards - 1))

-N = int(eval(input())) -A = [int(Ai) for Ai in input().split()] -cards = len(set(A)) +eval(input()) +cards = len(set([Ai for Ai in input().split()]))