n = int(eval(input()))

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

medIndex = int((n-1)/2)

Z = sorted(X[:])

c1 = Z[int(n/2-1)]

c2 = Z[int(n/2)]

for i in range(n) :

  if (X[i] <= c1) :

    print(c2)

  else :

    print(c1)

N = int(eval(input()))

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

AA = sorted(A)

X = AA[N//2 - 1]

Y = AA[N//2]

for i in range(N):

  if A[i] < Y:

    print(Y)

  if A[i] >= Y:

    print(X)
n = int(eval(input()))
X = list(map(int, input().split()))
medIndex = int((n - 1) / 2)
Z = sorted(X[:])
c1 = Z[int(n / 2 - 1)]
c2 = Z[int(n / 2)]
for i in range(n):
    if X[i] <= c1:
        print(c2)
    else:
        print(c1)

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

-n = int(eval(input())) -X = list(map(int, input().split())) -medIndex = int((n - 1) / 2) -Z = sorted(X[:]) -c1 = Z[int(n / 2 - 1)] -c2 = Z[int(n / 2)] -for i in range(n): -    if X[i] <= c1: -        print(c2) -    else: -        print(c1) +N = int(eval(input())) +A = list(map(int, input().split())) +AA = sorted(A) +X = AA[N // 2 - 1] +Y = AA[N // 2] +for i in range(N): +    if A[i] < Y: +        print(Y) +    if A[i] >= Y: +        print(X)