process.stdin.resume();
process.stdin.setEncoding("utf8");

const reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout,
});

const lines = [];

reader.on("line", (line) => {
  lines.push(line);
});

reader.on("close", () => {
  for (let i=0;i<lines.length;i++) {
    const [x,y]=lines[i].split(" ").map(Number)
    if(x===0&&y===0)break;
    const [s,b]=x<y?[x,y]:[y,x]
    console.log(`%d %d`,s,b);
  }
});


