

import numpy as np



n = int(eval(input()))

x_str = input().split()

xs = np.array([int(c) for c in x_str])



xs_len = len(xs)

center = (xs_len - 1)//2



c_xs = np.sort(xs)



for x in xs:

    if x <= c_xs[center]:

        print((c_xs[center+1]))

    else:

        print((c_xs[center]))



n = int(eval(input()))

x_str = input().split()

xs = [int(c) for c in x_str]



xs_len = len(xs)

center = (xs_len - 1)//2



c_xs = xs[:]

c_xs.sort()



for x in xs:

    if x <= c_xs[center]:

        print((c_xs[center+1]))

    else:

        print((c_xs[center]))

import numpy as np

n = int(eval(input()))
x_str = input().split()
xs = np.array([int(c) for c in x_str])
xs_len = len(xs)
center = (xs_len - 1) // 2
c_xs = np.sort(xs)
for x in xs:
    if x <= c_xs[center]:
        print((c_xs[center + 1]))
    else:
        print((c_xs[center]))

n = int(eval(input()))
x_str = input().split()
xs = [int(c) for c in x_str]
xs_len = len(xs)
center = (xs_len - 1) // 2
c_xs = xs[:]
c_xs.sort()
for x in xs:
    if x <= c_xs[center]:
        print((c_xs[center + 1]))
    else:
        print((c_xs[center]))

-import numpy as np - -xs = np.array([int(c) for c in x_str]) +xs = [int(c) for c in x_str] -c_xs = np.sort(xs) +c_xs = xs[:] +c_xs.sort()