const input = require('fs').readFileSync('/dev/stdin', 'utf8');

const lines = input.trim().split('\n');

    lines.forEach(function(val){
        const dataStrings = val.split(' ');
        
        const x = Number(dataStrings[0]);
        const y = Number(dataStrings[1]);
        if (x === 0 && y === 0) {
          return false;
        } else {
          if (x < y) {
          console.log(x +' '+ y);
        } else {
          console.log(y +' '+ x);
        }
        }
      });
