process.stdin.resume();
proces.stdin.setEncodint('utf8');
process.stdin.('data',function(chunk){


 var line = chunk.split(/\n/);

for (var i = 0; i < line.length; i++){

var lines = line[i].split(' ').map(Number);

 if (lines [0] === 0 && lines [1] === 0){break;} 

 console.log(Math.min(lines[0],lines[1])+' '+ Math.max(lines[0],lines[1]));

 } 
 

});