let input = require('fs').readFileSync( '/dev/stdin', 'utf8' );
let arr = input.split("\n");
for (let i = 0; i < arr.length; i ++) {
    let ab = arr[i].split(" ").map(Number);
    if (ab[0] === 0 && ab[1] === 0) break;
    console.log("%d %d",  Math.min(ab[0], ab[1]), Math.max(ab[0], ab[1]));
}
