import scala.io.StdIn

object Main {
  def main(args: Array[String]): Unit = {
    val inputs = Iterator.continually(StdIn.readLine()).takeWhile(_ != null)
    inputs.map(_.split(" ").map(_.toInt)).foreach{
      case Array(0, 0) =>
      case Array(a, b) if a <= b => println(s"$a $b")
      case Array(a, b) if a > b => println(s"$b $a")
    }
  }
}