var x = require('fs').readFileSync('/dev/stdin', 'utf8');
input = x.split(/[\n|\s]/);
i = 0;
while (!((input[i] == "0")&&(input[i+1] == "0"))) {
  if (parseInt(input[i]) > parseInt(input[i+1])) {
    temp = input[i];
    input[i] = input[i+1]
    input[i+1] = temp;
  }
  console.log(input[i] + " " + input[i+1]);
  i = i+2;
}

