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

for (let i = 0; i < input.length; i++) {
    let num = input[i].split(' ').map(Number);
       if (num[0] === 0 && num[1] === 0) {
        break;
    }
    num.sort(function (a, b) {return a - b; });
    console.log(num[0], num[1]);
}

