import java.util.*

fun main(args: Array<String>) {
	val scan = Scanner(System.`in`)
	while (true) {
		val x = scan.nextInt()
		val y = scan.nextInt()
		if (x == 0 && y == 0) break
		println(if (x < y) {"$x $y"} else {"$y $x"})
	}
}
