import io.Source.stdin

object Main {
  
  def main(args: Array[String]) {
    for ((list) <- stdin.getLines().toList.takeWhile(_ != "0 0").map(_.split(" "))) {
      val x = list(0).toInt
      val y = list(1).toInt
      if (x < y) println(s"$x $y")
      else println(s"$y $x")
    }
  }
}

