object Main {
  def main(args: Array[String]) {
    val sc = new java.util.Scanner(System.in)
    var a, b = sc.nextInt

    do {
      if (a < b) println(s"$a $b")
        else println(s"$b $a")
      a = sc.nextInt
      b = sc.nextInt
    } while ( a != 0 || b != 0)
  }
}