object Main {
  def main(args: Array[String]): Unit = {
    Iterator.continually(io.StdIn.readLine().split(" ").map(_.toInt))
      .takeWhile {
        case Array(0, 0) => false
        case _ => true
      }
      .foreach { case Array(x, y) =>
        val output =
          if (x < y) s"$x $y"
          else       s"$y $x"

        println(output)
      }
  }
}