object Main {
  def main(args:Array[String]) {
    for (line <- scala.io.Source.stdin.getLines() if line != "0 0") {
      if (line(0) < line(2)) {
        println(line(0) + " " + line(2))
      } else {
        println(line(2) + " " + line(0))
      }
    }
  }
}