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

1e625a9b3aba6a9c3185c717c2721053a3683244
<mask token>

<mask token>
arr.sort()
<mask token>
print(ans)

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