n,*a=list(map(int,open(0).read().split()))

b=len(set(a))

print((b-(n-b)%2))
_,a=open(0);b=len(set(a.split()));print((b+b%2-1))
n, *a = list(map(int, open(0).read().split()))
b = len(set(a))
print((b - (n - b) % 2))

_, a = open(0)
b = len(set(a.split()))
print((b + b % 2 - 1))

-n, *a = list(map(int, open(0).read().split())) -b = len(set(a)) -print((b - (n - b) % 2)) +_, a = open(0) +b = len(set(a.split())) +print((b + b % 2 - 1))