fun main(args: Array<String>) {
    solve(java.util.Scanner(System.`in`))
}

fun solve(sc: java.util.Scanner) {
    val N = sc.nextInt()
    val X = (0 until N).map { sc.nextLong() }

    val Xs = X.sorted()
    val midL = Xs[N / 2 - 1]
    val midR = Xs[N / 2]

    println((0 until N).map {
        if (X[it] < midR) midR else midL
    }.joinToString("\n"))
}
