n=int(eval(input()))

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

y=sorted(x)

for i in x:

    if i>y[n//2-1]:

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

    else:

        print((y[n//2]))
n,*a=list(map(int,open(0).read().split()))

b=sorted(a)

c,d=b[n//2-1],b[n//2]

for i in a:

    print((d if i<=c else c))
n = int(eval(input()))
x = [int(i) for i in input().split()]
y = sorted(x)
for i in x:
    if i > y[n // 2 - 1]:
        print((y[n // 2 - 1]))
    else:
        print((y[n // 2]))

n, *a = list(map(int, open(0).read().split()))
b = sorted(a)
c, d = b[n // 2 - 1], b[n // 2]
for i in a:
    print((d if i <= c else c))

-n = int(eval(input())) -x = [int(i) for i in input().split()] -y = sorted(x) -for i in x: -    if i > y[n // 2 - 1]: -        print((y[n // 2 - 1])) -    else: -        print((y[n // 2])) +n, *a = list(map(int, open(0).read().split())) +b = sorted(a) +c, d = b[n // 2 - 1], b[n // 2] +for i in a: +    print((d if i <= c else c))