n = int(eval(input()))

d = {}

for i in range(n):

    a = int(eval(input()))

    if a in d:

        d[a] = not d[a]

    else:

        d[a] = True

ans = 0

for i in d:

    if d[i]: ans += 1

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

d = set()

for i in range(n):

    a = int(eval(input()))

    if a in d:

        d.remove(a)

    else:

        d.add(a)

print((len(d)))
n = int(eval(input()))
d = {}
for i in range(n):
    a = int(eval(input()))
    if a in d:
        d[a] = not d[a]
    else:
        d[a] = True
ans = 0
for i in d:
    if d[i]:
        ans += 1
print(ans)

n = int(eval(input()))
d = set()
for i in range(n):
    a = int(eval(input()))
    if a in d:
        d.remove(a)
    else:
        d.add(a)
print((len(d)))

-d = {} +d = set() -        d[a] = not d[a] +        d.remove(a) -        d[a] = True -ans = 0 -for i in d: -    if d[i]: -        ans += 1 -print(ans) +        d.add(a) +print((len(d)))