
object Main {
    def main(args : Array[String]) : Unit = {
        for (line <- io.Source.stdin.getLines() if line != "0 0") {
            println(line.split(" ").map(_.toInt).toList.sorted.mkString(" "))
        }
    }
}