local n=io.read("*n","*l")
local a={}
local b={}
for i=1,n do
    x=io.read("*n")
    a[i]=x
    b[i]=x
end
table.sort(b)

for i=1,n do
    if a[i]>b[n//2] then
        print(b[n//2])
    else
        print(b[n//2+1])
    end
end
