a = int(eval(input()))

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

c = sorted(b)

print((c[int(0.5*a)]-c[int(0.5*a-1)]))
N = int(eval(input()))

D = sorted(map(int,input().split()))

print((max(0,D[N//2]-D[N//2-1])))
a = int(eval(input()))
b = list(map(int, input().split()))
c = sorted(b)
print((c[int(0.5 * a)] - c[int(0.5 * a - 1)]))

N = int(eval(input()))
D = sorted(map(int, input().split()))
print((max(0, D[N // 2] - D[N // 2 - 1])))

-a = int(eval(input())) -b = list(map(int, input().split())) -c = sorted(b) -print((c[int(0.5 * a)] - c[int(0.5 * a - 1)])) +N = int(eval(input())) +D = sorted(map(int, input().split())) +print((max(0, D[N // 2] - D[N // 2 - 1])))