import scala.io.StdIn.readLine

object Main extends App {

  for (_ <- 1 to 10000) {
    val input = readLine().split(" ").map(_.toInt).sorted
    if (input(0) == 0 && input(1) == 0) sys.exit else println(input.mkString(" "))
  }

}

