n=int(eval(input()))

d=[int(x) for x in input().rstrip().split()]

d.sort()

if d[n//2-1]==d[n//2]:

  print((0))

else:

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

n=int(eval(input()))

d=[int(x) for x in input().rstrip().split()]

d.sort()

ind=n//2



if d[ind-1]==d[ind]:

  print((0))



else:

  print((d[ind]-d[ind-1]))



n = int(eval(input()))
d = [int(x) for x in input().rstrip().split()]
d.sort()
if d[n // 2 - 1] == d[n // 2]:
    print((0))
else:
    print((d[n // 2] - d[n // 2 - 1]))

n = int(eval(input()))
d = [int(x) for x in input().rstrip().split()]
d.sort()
ind = n // 2
if d[ind - 1] == d[ind]:
    print((0))
else:
    print((d[ind] - d[ind - 1]))

-if d[n // 2 - 1] == d[n // 2]: +ind = n // 2 +if d[ind - 1] == d[ind]: -    print((d[n // 2] - d[n // 2 - 1])) +    print((d[ind] - d[ind - 1]))