N=int(eval(input()))

temp=input().split()

d=[int(temp[i]) for i in range(N)]



d.sort()

print((d[int(N/2)]-d[int(N/2-1)]))
n=int(eval(input()))

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



d.sort()



print((int(d[int(n/2)]-d[int(n/2-1)])))
N = int(eval(input()))
temp = input().split()
d = [int(temp[i]) for i in range(N)]
d.sort()
print((d[int(N / 2)] - d[int(N / 2 - 1)]))

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

-N = int(eval(input())) -temp = input().split() -d = [int(temp[i]) for i in range(N)] +n = int(eval(input())) +d = list(map(int, input().split())) -print((d[int(N / 2)] - d[int(N / 2 - 1)])) +print((int(d[int(n / 2)] - d[int(n / 2 - 1)])))