object Main extends App {
	val n = scala.io.StdIn.readInt
	val x = scala.io.StdIn.readLine.split(" ").map(_.toLong).sorted

	for(i<-0 until n/2){
		println(x(n/2))
	}

	for(i<-n/2 until n){
		println(x(n/2 - 1))
	}

}