n = int(eval(input()))

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



x.sort(key= lambda x:x[1])



for i in range(n):

    ans = x[n//2][1] if i < n//2 else x[n//2-1][1]

    x[i].append(ans)



x.sort(key= lambda x:x[0])



for i in range(n):

    print((x[i][2]))
n = int(eval(input()))

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



nx = sorted(x)

a = nx[n//2]

b = nx[n//2-1]



for i in range(n):

    ans = a if x[i] < a  else b

    print(ans)

    
n = int(eval(input()))
x = [[i, int(item)] for i, item in enumerate(input().split())]
x.sort(key=lambda x: x[1])
for i in range(n):
    ans = x[n // 2][1] if i < n // 2 else x[n // 2 - 1][1]
    x[i].append(ans)
x.sort(key=lambda x: x[0])
for i in range(n):
    print((x[i][2]))

n = int(eval(input()))
x = [int(i) for i in input().split()]
nx = sorted(x)
a = nx[n // 2]
b = nx[n // 2 - 1]
for i in range(n):
    ans = a if x[i] < a else b
    print(ans)

-x = [[i, int(item)] for i, item in enumerate(input().split())] -x.sort(key=lambda x: x[1]) +x = [int(i) for i in input().split()] +nx = sorted(x) +a = nx[n // 2] +b = nx[n // 2 - 1] -    ans = x[n // 2][1] if i < n // 2 else x[n // 2 - 1][1] -    x[i].append(ans) -x.sort(key=lambda x: x[0]) -for i in range(n): -    print((x[i][2])) +    ans = a if x[i] < a else b +    print(ans)