var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var sp = input.split("\n");
for( var i = 0; sp[i] !== "0 0"; i++ ) {
  var x = sp[i].split(" ").map(Number);
  if( x[0] < x[1] ) {
    console.log( x[0] + " " + x[1] );
  } else {
    console.log( x[1] + " " + x[0] );
  }
}