n = int(eval(input()))

a = [int(eval(input())) for i in range(n)]

dic = {}

for i in range(n):

    if a[i] in dic:

        del dic[a[i]]

    else:

        dic[a[i]] = None

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

dic = {}

for i in range(n):

    a = eval(input())

    if a in dic:

        del dic[a]

    else:

        dic[a] = None

print((len(dic)))
n = int(eval(input()))
a = [int(eval(input())) for i in range(n)]
dic = {}
for i in range(n):
    if a[i] in dic:
        del dic[a[i]]
    else:
        dic[a[i]] = None
print((len(dic)))

n = int(eval(input()))
dic = {}
for i in range(n):
    a = eval(input())
    if a in dic:
        del dic[a]
    else:
        dic[a] = None
print((len(dic)))

-a = [int(eval(input())) for i in range(n)] -    if a[i] in dic: -        del dic[a[i]] +    a = eval(input()) +    if a in dic: +        del dic[a] -        dic[a[i]] = None +        dic[a] = None