N = int(eval(input()))

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

abcmax = d[N//2-1]

arcmin = d[N//2]

print((arcmin - abcmax))
N = int(eval(input()))

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

ans = D[N//2] - D[N//2-1]

print(ans)
N = int(eval(input()))
d = sorted(map(int, input().split()))
abcmax = d[N // 2 - 1]
arcmin = d[N // 2]
print((arcmin - abcmax))

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

-d = sorted(map(int, input().split())) -abcmax = d[N // 2 - 1] -arcmin = d[N // 2] -print((arcmin - abcmax)) +D = sorted(map(int, input().split())) +ans = D[N // 2] - D[N // 2 - 1] +print(ans)