N = int(eval(input()))

x = {}

ans = {}

y = []

k = 1

l = 1

for i in list(map(int,input().split())):

    x[k] = i

    y.append(i)

    k += 1



y.sort()

m_1 = y[int(N/2)]

m_2 = y[int(N/2)-1]



for i,j in sorted(list(x.items()),key = lambda x: x[1]):

    if (int(N/2) >= l):

        ans[i] = m_1

        l+=1

    else:

        ans[i] = m_2

        l+=1



for i,j in sorted(ans.items()):

    print(j)
N = int(eval(input()))

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

sortA = sorted(A)



for i in range(N):

    if A[i] < sortA[N//2]:

        print((sortA[N//2]))

    else:

        print((sortA[N//2 - 1]))
N = int(eval(input()))
x = {}
ans = {}
y = []
k = 1
l = 1
for i in list(map(int, input().split())):
    x[k] = i
    y.append(i)
    k += 1
y.sort()
m_1 = y[int(N / 2)]
m_2 = y[int(N / 2) - 1]
for i, j in sorted(list(x.items()), key=lambda x: x[1]):
    if int(N / 2) >= l:
        ans[i] = m_1
        l += 1
    else:
        ans[i] = m_2
        l += 1
for i, j in sorted(ans.items()):
    print(j)

N = int(eval(input()))
A = [int(i) for i in input().split()]
sortA = sorted(A)
for i in range(N):
    if A[i] < sortA[N // 2]:
        print((sortA[N // 2]))
    else:
        print((sortA[N // 2 - 1]))

-x = {} -ans = {} -y = [] -k = 1 -l = 1 -for i in list(map(int, input().split())): -    x[k] = i -    y.append(i) -    k += 1 -y.sort() -m_1 = y[int(N / 2)] -m_2 = y[int(N / 2) - 1] -for i, j in sorted(list(x.items()), key=lambda x: x[1]): -    if int(N / 2) >= l: -        ans[i] = m_1 -        l += 1 +A = [int(i) for i in input().split()] +sortA = sorted(A) +for i in range(N): +    if A[i] < sortA[N // 2]: +        print((sortA[N // 2])) -        ans[i] = m_2 -        l += 1 -for i, j in sorted(ans.items()): -    print(j) +        print((sortA[N // 2 - 1]))