process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function(chunk) {
 


for(i in lines){
var xy= chunk.split('\n').map(Number);
xy.sort();
if(xy[0] == 0 && xy[1] == 0){break;}

console.log(xy[0],xy[1]);
}
 
 
});