process.stdin.resume();
process.stdin.setEncoding('utf8');
// ???????????????????¨??????§
// Let's ?????£??¬????????????
process.stdin.on('data', function (chunk) {
    var line = chunk.toString().split("\n");
    var x = parseInt(line[0],10);
    var y = parseInt(line[1],10);


  for(var i = 0; i < line.length; i++){
     if(x == 0 && y == 0 ){break;}
      
     console.log(Math.max(x,y)+" "+Math.min(x,y));
   }

   
});