
object Main extends App {
    override def main(args: Array[String]) = {
        val sc = new java.util.Scanner(System.in)
        
        Iterator.continually(new Datum(sc.nextInt,sc.nextInt)).takeWhile(_.isContinue).foreach{ d => 
            println(d.solve)
        }
        
    }
    
    class Datum(val x:Int , val y:Int){
        val isContinue:Boolean = !(x == 0 && y == 0)
        
        def solve:String = Math.min(x,y) + " " + Math.max(x,y) 
        
    }
}