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

for(var i = 0; i < line.length; i++){
if(xy[0] == 0 && xy[1] == 0){break;}


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