N = int(eval(input()))

A = [eval(input()) for _ in range(N)]

a = {}

for i in range(N):

  if A[i] in a:

    a[A[i]] += 1

  else:

    a[A[i]] = 1



ans = 0

for i in list(a.values()):

  if i % 2 != 0:

    ans += 1

print(ans)
n = int(eval(input()))

A = [int(eval(input())) for _ in range(n)]



p = {}

for a in A:

    if a in p:

        if p[a] == 1:

            p[a] = 0

            continue

    p[a] = 1

ans = 0

for i in list(p.values()):ans += i

print(ans)
N = int(eval(input()))
A = [eval(input()) for _ in range(N)]
a = {}
for i in range(N):
    if A[i] in a:
        a[A[i]] += 1
    else:
        a[A[i]] = 1
ans = 0
for i in list(a.values()):
    if i % 2 != 0:
        ans += 1
print(ans)

n = int(eval(input()))
A = [int(eval(input())) for _ in range(n)]
p = {}
for a in A:
    if a in p:
        if p[a] == 1:
            p[a] = 0
            continue
    p[a] = 1
ans = 0
for i in list(p.values()):
    ans += i
print(ans)

-N = int(eval(input())) -A = [eval(input()) for _ in range(N)] -a = {} -for i in range(N): -    if A[i] in a: -        a[A[i]] += 1 -    else: -        a[A[i]] = 1 +n = int(eval(input())) +A = [int(eval(input())) for _ in range(n)] +p = {} +for a in A: +    if a in p: +        if p[a] == 1: +            p[a] = 0 +            continue +    p[a] = 1 -for i in list(a.values()): -    if i % 2 != 0: -        ans += 1 +for i in list(p.values()): +    ans += i