n=int(eval(input()))

# print(n)

di=[]

for i in map(int,input().split()):

    di.append(i)

di.sort()

n1=int(n/2)

m=di[n1] -di[n1-1]

print(m)


n=int(eval(input()))

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



d.sort()



print((d[n//2]-d[n//2-1]))

n = int(eval(input()))
# print(n)
di = []
for i in map(int, input().split()):
    di.append(i)
di.sort()
n1 = int(n / 2)
m = di[n1] - di[n1 - 1]
print(m)

n = int(eval(input()))
d = list(map(int, input().split()))
d.sort()
print((d[n // 2] - d[n // 2 - 1]))

-# print(n) -di = [] -for i in map(int, input().split()): -    di.append(i) -di.sort() -n1 = int(n / 2) -m = di[n1] - di[n1 - 1] -print(m) +d = list(map(int, input().split())) +d.sort() +print((d[n // 2] - d[n // 2 - 1]))