object Main {
  def main (args: Array[String]) {
    var count:Int = 0
    for(line <- scala.io.Source.stdin.getLines() if line != "0 0"){
        val a = line.split(" ").map(_.toInt).sorted(Ordering[Int]);
        println(a(0), a(1));
    }
  }
}