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

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

    // Edit from here
    const a = numbers[0];
    const b = numbers[1];

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

    const output = a < b ? a + ' ' + b : b + ' ' + a;

    console.log(output);

    // to here
}

