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


var line = chunk.toString().split(' ');

for (var i = 0; i < line.length; i++){
var line = line[i].split(' ').map(Number);
 if (line[0] === 0 && line[1] === 0){break;} 
 console.log(Math.min(line[0],line[1])+' '+Math.max(line[0],line[1]));
 } 
 

});