import java.util.Scanner

fun main(args :Array<String>){
    val cin = Scanner(System.`in`)

    while(true){
	var x = cin.nextInt()
	var y = cin.nextInt()

	if(x == 0 && y == 0){
	    break
	}else{
	    if(x < y){
		println("$x $y")
	    }else{
		println("$y $x")
	    }
	}
    }
}

