N = int(eval(input()))

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

d.sort()

harf_N = int(N/2)

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

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

#print(n)

a.sort()

#print(a)

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

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

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