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