'use strict'

function main(input) {

    input = input.split('\n')
    let n = ~~input[0]
    let x = input[1].split(' ').map(v => ~~v) //.sort((a, b) => a - b)
    let x2 = input[1].split(' ').map(v => ~~v).sort((a, b) => a - b)
    let mid = x2[n / 2]
    let index = 0
    for (let i = 0; i < n; i++) {

        // 
        if (x[i] < mid) {
            index = (n) / 2

        } else {
            index = (n) / 2 - 1
        }

        console.log(x[index])

    }
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));