process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
  input += chunk;
});
readable.on('end', function () {
  var data = input.split('\n');
  var output = [];
  for (var i = 0; i < data.lenght; i++) {
    var xy = data[i].split( ' ' );
    if ("0 0" == data[i] ) { break; }
    if (parseInt( xy[i] ) < parseInt( xy[0] ) ) {
      output.push(xy [i] + ' ' ; xy[0] );
    } else {
      output.push (data[i]);
    }
  }
  console.log(output.join( '\n' ) );
});