'use strict';
(function(stdin) {
  // ????????????????????????
  var EOF = '0 0';
  var inputs = stdin.toString().split('\n');
  var data = inputs.slice(0,inputs.indexOf(EOF));
  // console.log('array -> ' ,data)

  for (var i = 0; i < data.length; i++) {
  	var cols = data[i].split(' ').map(Number);
  	var x = cols[0];
  	var y = cols[1];
  	// console.log('x:',x,'y:',y);
  if(x > y){
  var tmp = x;
  x = y;
  y = tmp;
  }
    console.log(x,y);
  }
}(require('fs').readFileSync('/dev/stdin', 'utf8')));