import scala.io.StdIn

/**
  * AOJ
  */
object Main {

  def main(args: Array[String]): Unit = {

    var i = 1
    while(true){
      val in = StdIn.readLine().split(" ").map(s => s.toInt)
      if(in(0) == 0 && in(1) == 0){
        return
      } else {
        val answer = in.toSeq.sorted
        println(answer(0) + " " + answer(1))}
      i += 1
    }
 }
}