process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function(chunk) {
 
var xy= chunk.split('\n').map(Number);
xy.sort();

for(var i = 0; i < line.length; i++){
if(xy[0] === 0 && xy[1] === 0){
 break;
}
xy.sort(function (a, b) {return a - b; });
  console.log(xy[0], xy[1]);
}