n = int(eval(input()))

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



d.sort()

ans = 0

start_num = d[int(n / 2 - 1)]

end_num = d[int(n / 2)]



ans = end_num - start_num



print(ans)

n = int(eval(input()))

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



d.sort()



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

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

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

-ans = 0 -start_num = d[int(n / 2 - 1)] -end_num = d[int(n / 2)] -ans = end_num - start_num -print(ans) +print((d[n // 2] - d[n // 2 - 1]))