n=int(eval(input()))

mydict={}



for i in range(n):

  a=int(eval(input()))

  if a in mydict:

    if mydict[a]==1:

      mydict[a]=0

    else:

      mydict[a]=1

  else:

    mydict[a]=1

    

#print(mydict)

mylist=list(mydict.values())



print((sum(mylist)))

mydict={}

n=int(eval(input()))



#print(n,a)

for i in range(n):

  a=eval(input())

  if a in mydict:

    del mydict[a]

  else:

    mydict[a]=1

    

print((len(mydict)))

n = int(eval(input()))
mydict = {}
for i in range(n):
    a = int(eval(input()))
    if a in mydict:
        if mydict[a] == 1:
            mydict[a] = 0
        else:
            mydict[a] = 1
    else:
        mydict[a] = 1
# print(mydict)
mylist = list(mydict.values())
print((sum(mylist)))

mydict = {}
n = int(eval(input()))
# print(n,a)
for i in range(n):
    a = eval(input())
    if a in mydict:
        del mydict[a]
    else:
        mydict[a] = 1
print((len(mydict)))

+mydict = {} -mydict = {} +# print(n,a) -    a = int(eval(input())) +    a = eval(input()) -        if mydict[a] == 1: -            mydict[a] = 0 -        else: -            mydict[a] = 1 +        del mydict[a] -# print(mydict) -mylist = list(mydict.values()) -print((sum(mylist))) +print((len(mydict)))