process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (chunk) {
    var lines = chunk.toString().split(' ');
    var x = lines; //???????????°???????????????????????????
    for(i=0; i<x.length; i++){
        x[i] = parseInt(x[i], 10);
    }
    
    if(x[0] === 0 && x[1] === 0)
      break;
    else if(x[0]<x[1])
      console.log(x[0]+" "+x[1]);
    else if(x[0]>x[1])
      console.log(x[1]+" "+x[0]); 
});