object Main {
  def main(args:Array[String]){
    try{
      while(true){
        var numAry=io.StdIn.readLine.split(" ").map(_.toInt).sorted
        if(numAry(1)==0) throw new Exception
        println(numAry.mkString(" "))
      }
    }
    catch{
      case _:Exception=>()
    }
  }
}