n=int(eval(input()))

a=list(map(int,input().split()))

a.sort()

kjn=0

mi2=0

mi=0

for i in range(0,n):

    if a[i]==kjn:

        mi2=1-mi2

    else:

        kjn=a[i]

        mi+=1

print((mi-mi2))
n=int(eval(input()))

a=list(map(int,input().split()))

sn=[0]*100001

mi2=0

mi=0

for i in range(0,n):

    if sn[a[i]]==1:

        mi2=1-mi2

    else:

        sn[a[i]]=1

        mi+=1

print((mi-mi2))
n = int(eval(input()))
a = list(map(int, input().split()))
a.sort()
kjn = 0
mi2 = 0
mi = 0
for i in range(0, n):
    if a[i] == kjn:
        mi2 = 1 - mi2
    else:
        kjn = a[i]
        mi += 1
print((mi - mi2))

n = int(eval(input()))
a = list(map(int, input().split()))
sn = [0] * 100001
mi2 = 0
mi = 0
for i in range(0, n):
    if sn[a[i]] == 1:
        mi2 = 1 - mi2
    else:
        sn[a[i]] = 1
        mi += 1
print((mi - mi2))

-a.sort() -kjn = 0 +sn = [0] * 100001 -    if a[i] == kjn: +    if sn[a[i]] == 1: -        kjn = a[i] +        sn[a[i]] = 1