N = int(eval(input()))

f = set()

eat = 0

for a in map(int, input().split()):

    if a in f:

        eat += 1

    else:

        f.add(a)

print((N - eat - eat % 2))
N = int(eval(input()))

eat = N - len(set(map(int, input().split())))

print((N - eat - eat % 2))
N = int(eval(input()))
f = set()
eat = 0
for a in map(int, input().split()):
    if a in f:
        eat += 1
    else:
        f.add(a)
print((N - eat - eat % 2))

N = int(eval(input()))
eat = N - len(set(map(int, input().split())))
print((N - eat - eat % 2))

-f = set() -eat = 0 -for a in map(int, input().split()): -    if a in f: -        eat += 1 -    else: -        f.add(a) +eat = N - len(set(map(int, input().split())))