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], b = numbers[1];
    if(a === 0 && b === 0)
        break;
    let output = a <= b ? `${a} ${b}` : `${b} ${a}`;
    console.log(output);
}
