object Main extends App {
  var numAry = io.StdIn.readLine.split(' ').map { _.toInt }
  while (numAry(0) != 0 && numAry (1) != 0) {
    println(numAry.sorted.mkString(" "))
    numAry = io.StdIn.readLine.split(' ').map { _.toInt }
  }
}