n=int(eval(input()))

ab = []

for _ in range(n):

    a= int(eval(input()))

    ab.append(a)



ab.sort()

memo = 1

ans = 0

for i in range(n):

    if i == n-1:

        ans += memo%2

    elif ab[i] == ab[i+1]:

        memo += 1

    else:

        ans += memo%2

        memo = 1

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

memo = {}

for i in range(N):

    s = int(eval(input()))

    if s in memo:

        memo[s] += 1

    else:

        memo[s] = 1

ans = 0

for key, val in list(memo.items()):

    if val%2:

        ans += 1

print(ans)
n = int(eval(input()))
ab = []
for _ in range(n):
    a = int(eval(input()))
    ab.append(a)
ab.sort()
memo = 1
ans = 0
for i in range(n):
    if i == n - 1:
        ans += memo % 2
    elif ab[i] == ab[i + 1]:
        memo += 1
    else:
        ans += memo % 2
        memo = 1
print(ans)

N = int(eval(input()))
memo = {}
for i in range(N):
    s = int(eval(input()))
    if s in memo:
        memo[s] += 1
    else:
        memo[s] = 1
ans = 0
for key, val in list(memo.items()):
    if val % 2:
        ans += 1
print(ans)

-n = int(eval(input())) -ab = [] -for _ in range(n): -    a = int(eval(input())) -    ab.append(a) -ab.sort() -memo = 1 +N = int(eval(input())) +memo = {} +for i in range(N): +    s = int(eval(input())) +    if s in memo: +        memo[s] += 1 +    else: +        memo[s] = 1 -for i in range(n): -    if i == n - 1: -        ans += memo % 2 -    elif ab[i] == ab[i + 1]: -        memo += 1 -    else: -        ans += memo % 2 -        memo = 1 +for key, val in list(memo.items()): +    if val % 2: +        ans += 1