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
    
    if ( numbers[0] === 0 && numbers[1] === 0) { break; }
    const switchedNumbers = [numbers[1], numbers[0]];
    const output = switchedNumbers.join(' ');

    // to here
    console.log(output);
}

