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

while (line = lines.shift()) {
        const numbers = line.split(' ').map(Number);

        let a = numbers[0];
        let b = numbers[1];

        if (a === 0 && b === 0){break;}

        if(a > b){
            const tmp = a;
            a = b;
            b = tmp;
        }
        
        const output = a + ' ' + b;

        console.log(output);
}
