function main(input) {
  var temp = input.split('\n');

  for (var i =0; i < temp.length; i++) {
    var data = temp[i].split(' ');
    var x = parseInt(data[0]);
    var y = parseInt(data [1]);
    if(x == 0 && y ==0){
      break;
    }
    if (x < y) {
      console.log(x+' '+y);
    } else {
      console.log(y+' '+x);
    }
  }
}

var x = require('fs').readFileSync('/dev/stdin', 'utf-8');
main(x);
