object Main extends App {
	override def main(args: Array[String]) = {
		val sc = new java.util.Scanner(System.in)
		
		var cont: Boolean = true
		while(cont){
			val d = new Datum(sc.nextInt,sc.nextInt)
			cont = d.isContinue
			if(cont){
				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) 
		
	}
}