N = int(input())

X = sorted([[x,i] for i, x in enumerate(map(int,input().split()))])

med1,med2 = X[(N-1)//2][0], X[(N-1)//2+1][0]

ans = []

for idx1, x in enumerate(X):

  if idx1 <= (N-1)//2: ans.append([x[1],med2])

  else: ans.append([x[1],med1])

  #print(i)

[print(med) for i, med in sorted(ans)]

N = int(eval(input()))

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

sorted_X = sorted(X)

med_options = [sorted_X[N//2-1], sorted_X[N//2]]



for i in range(N):

    if X[i] <= med_options[0]:

        print((med_options[1]))

    elif med_options[1] <= X[i]:

        print((med_options[0]))

N = int(input())
X = sorted([[x, i] for i, x in enumerate(map(int, input().split()))])
med1, med2 = X[(N - 1) // 2][0], X[(N - 1) // 2 + 1][0]
ans = []
for idx1, x in enumerate(X):
    if idx1 <= (N - 1) // 2:
        ans.append([x[1], med2])
    else:
        ans.append([x[1], med1])
    # print(i)
[print(med) for i, med in sorted(ans)]

N = int(eval(input()))
X = list(map(int, input().split()))
sorted_X = sorted(X)
med_options = [sorted_X[N // 2 - 1], sorted_X[N // 2]]
for i in range(N):
    if X[i] <= med_options[0]:
        print((med_options[1]))
    elif med_options[1] <= X[i]:
        print((med_options[0]))

-N = int(input()) -X = sorted([[x, i] for i, x in enumerate(map(int, input().split()))]) -med1, med2 = X[(N - 1) // 2][0], X[(N - 1) // 2 + 1][0] -ans = [] -for idx1, x in enumerate(X): -    if idx1 <= (N - 1) // 2: -        ans.append([x[1], med2]) -    else: -        ans.append([x[1], med1]) -    # print(i) -[print(med) for i, med in sorted(ans)] +N = int(eval(input())) +X = list(map(int, input().split())) +sorted_X = sorted(X) +med_options = [sorted_X[N // 2 - 1], sorted_X[N // 2]] +for i in range(N): +    if X[i] <= med_options[0]: +        print((med_options[1])) +    elif med_options[1] <= X[i]: +        print((med_options[0]))