function Main(input) {
  let args = input.trim().split("\n");

  let n = args.length;
  for (let i = 0; i < n; i++) {
    let tmp = args[i].split(" ").map((x) => parseInt(x, 10));
    let x = tmp[0];
    let y = tmp[1];
    if (x === 0 && y === 0) {
      break;
    }
    if (x > y) {
      // 分割代入による swap
      [x, y] = [y, x];
    }
    console.log(x, y);
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
