n = int(eval(input()))

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



m = len(d)//2

print((d[m]-d[m-1]))
n = int(eval(input()))

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



x = d[n//2-1]

y = d[n//2]

print((y-x))
n = int(eval(input()))
d = sorted(list(map(int, input().split())))
m = len(d) // 2
print((d[m] - d[m - 1]))

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

-m = len(d) // 2 -print((d[m] - d[m - 1])) +x = d[n // 2 - 1] +y = d[n // 2] +print((y - x))