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

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

    const shouldTerminate = numbers[0] === 0 && numbers[1] === 0;

    if (!shouldTerminate) {
    	if (numbers[0] - numbers[1] >= 0) {
    		const item = numbers[0];
			numbers[0] = numbers[1];
			numbers[1] = item;
    	}

	    const output = numbers;
	    // to here

	    console.log(output[0].toString(), output[1].toString());
	}
}

