object Main extends App {
  val sc = new java.util.Scanner(System.in)
  var cnt = false
  do {
      val x, y = sc.nextInt
      cnt = x != 0 || y != 0
      val res = if(x < y) s"$x $y"
      else s"$y $x"
      if(cnt) println(res)
  } while(cnt)
}
