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 temp = a ;
 		a =b ;
 		b= temp;

 	}
    const output = a + ' ' + b;

    
    console.log(output);
    
}
