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

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  
  for(let i=0;i<lines.length;i++){
    const arr = lines[i].split(" ").map(Number)
    if(arr[0] == 0 && arr[1] == 0) break;
    if(arr[0] > arr[1]){
      const prev = arr[0];
      arr[0] = arr[1];
      arr[1] = prev;
    }
    console.log(arr.join(" "));
  }
});
