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()))

s=set()

for i in range(N):

  s^={eval(input())}

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()))
s = set()
for i in range(N):
    s ^= {eval(input())}
print((len(s)))

-    a = int(eval(input())) -    if a in s: -        s.remove(a) -    else: -        s.add(a) +    s ^= {eval(input())}