object Main {
  def main(args: Array[String]): Unit = {
    solve
  }

  def solve(): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    val x = new Array[Long](n)
    for (i <- 0 until n) {
      x(i) = sc.nextLong()
    }
    val sortedX = x.sorted
    val pw = new java.io.PrintWriter(System.out)
    for (i <- 0 until n) {
      val l = sortedX.indexOf(x(i)) + 1
      if ((l <= n / 2)) {
        pw.println(sortedX((n / 2) + 1 - 1))
      } else {
        pw.println(sortedX(n / 2 - 1))
      }
    }
    pw.flush()
  }
}
