import scala.io.StdIn.readLine

object Main {

  def main(args: Array[String]) = {
      var n = readLine.split(" ").map(_.toInt)
      while( n(0)!= 0 || n(1) != 0) {

          if(n(0)<n(1)) println(n(0)+" "+n(1))
          else println(n(1)+" "+n(0))
          n = readLine.split(" ").map(_.toInt)
      }
  }
}