n = int(eval(input()))

s = set()

for i in range(n):

    a = int(eval(input()))

    if a in s:

        s.remove(a)

    else:

        s.add(a)

print((len(s)))
n = int(eval(input()))

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

S = set()

for a in A:

    if a in S:

        S.remove(a)

    else:

        S.add(a)

print((len(S)))

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

n = int(eval(input()))
A = [int(eval(input())) for _ in range(n)]
S = set()
for a in A:
    if a in S:
        S.remove(a)
    else:
        S.add(a)
print((len(S)))

-s = set() -for i in range(n): -    a = int(eval(input())) -    if a in s: -        s.remove(a) +A = [int(eval(input())) for _ in range(n)] +S = set() +for a in A: +    if a in S: +        S.remove(a) -        s.add(a) -print((len(s))) +        S.add(a) +print((len(S)))