function Main(input){
  const arr = input.split('\n');
  let nums, a, b;

  for (let i = 0; i < arr.length; i++){
    nums = arr[i].split(' ').map(Number);
    a = nums[0];
    b = nums[1];
    if (a === 0 && b === 0){
      break;
    } else if (a > b) {
      console.log(b, a);
    } else {
      console.log(a, b);
    }    
      }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
