import numpy as np



N = int(eval(input()))

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



A = np.sort(X)

m1 = A[ N // 2 - 1]

m2 = A[ N // 2]

ans = []

for i in range(N):

    if X[i] < m2:

        print(m2)

    else:

        print(m1)

N = int(eval(input()))

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



A = sorted(X)

m1 = A[ N // 2 - 1]

m2 = A[ N // 2]

for i in range(N):

    if X[i] < m2:

        print(m2)

    else:

        print(m1)

import numpy as np

N = int(eval(input()))
X = np.array(list(map(int, input().split())))
A = np.sort(X)
m1 = A[N // 2 - 1]
m2 = A[N // 2]
ans = []
for i in range(N):
    if X[i] < m2:
        print(m2)
    else:
        print(m1)

N = int(eval(input()))
X = list(map(int, input().split()))
A = sorted(X)
m1 = A[N // 2 - 1]
m2 = A[N // 2]
for i in range(N):
    if X[i] < m2:
        print(m2)
    else:
        print(m1)

-import numpy as np - -X = np.array(list(map(int, input().split()))) -A = np.sort(X) +X = list(map(int, input().split())) +A = sorted(X) -ans = []