n = int(eval(input()))

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

cnt = {}

ans = 0

for x in nums:

    if x not in cnt:

        cnt[x] = 1

    else:

        cnt[x] += 1

for y in list(cnt.values()):

    if y % 2 != 0:

        ans += 1



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





ds = {}

for _ in range(N):

    A = eval(input())

    if A not in ds:

        ds[A] = 0

    else:

        ds[A] += 1



cnt = 0

for d in ds:

    if ds[d] % 2 == 0:

        cnt += 1



print(cnt)

n = int(eval(input()))
nums = [int(eval(input())) for _ in range(n)]
cnt = {}
ans = 0
for x in nums:
    if x not in cnt:
        cnt[x] = 1
    else:
        cnt[x] += 1
for y in list(cnt.values()):
    if y % 2 != 0:
        ans += 1
print(ans)

N = int(eval(input()))
ds = {}
for _ in range(N):
    A = eval(input())
    if A not in ds:
        ds[A] = 0
    else:
        ds[A] += 1
cnt = 0
for d in ds:
    if ds[d] % 2 == 0:
        cnt += 1
print(cnt)

-n = int(eval(input())) -nums = [int(eval(input())) for _ in range(n)] -cnt = {} -ans = 0 -for x in nums: -    if x not in cnt: -        cnt[x] = 1 +N = int(eval(input())) +ds = {} +for _ in range(N): +    A = eval(input()) +    if A not in ds: +        ds[A] = 0 -        cnt[x] += 1 -for y in list(cnt.values()): -    if y % 2 != 0: -        ans += 1 -print(ans) +        ds[A] += 1 +cnt = 0 +for d in ds: +    if ds[d] % 2 == 0: +        cnt += 1 +print(cnt)