function main(lines) {
  const input = lines.split('\n')
  for(let i=0; i<input.length; i++){
      let array = input[i].split(' ').map(function(val){return parseInt(val,10)}).sort(function(a,b){return a-b;})
      if(array[0] === 0 && array[1] === 0){
          break;
      } else {
          console.log(array.join(' '))
      }
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
