let str = require('fs').readFileSync('/dev/stdin', 'UTF-8');
let array = str.split('\n');
for ( let i = 0; i < array.length; i++) {
  let ab = array[i].split(' ').map(Number);
  if (ab[0] === 0 && ab[1] === 0) break;
  ab.sort((a, b) => { return a-b; });
  console.log(ab[0] + ' ' + ab[1]);
}
