fun main(args: Array<String>) {
    val pw = java.io.PrintWriter(System.out)
    solve(java.util.Scanner(System.`in`), pw)
    pw.flush()
}

fun solve(sc: java.util.Scanner, pw: java.io.PrintWriter) {
    val N = sc.nextInt()
    val X = Array(N) { sc.next().toLong() }

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

    for (i in 0 until N) {
        pw.println(if (X[i] < midR) midR else midL)
    }
}
