object Main {
  def main(args:Array[String]):Unit = {
    for (line <- scala.io.Source.stdin.getLines() if line != "0 0") {
      var ls = line.split(" ").map(_.toInt).sorted
      println(ls(0) + " " + ls(1))
    }
  }
}