var lines = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');
var i, xy;
for (i in lines) {
  xy = lines[i].split(' ').map(Number);
  if (xy[0] === 0 && xy[1] === 0) {
    break;
  }
  xy.sort(function (a, b) {return a - b; });
  console.log(xy[0], xy[1]);
}