
const gInput = require('fs').readFileSync('/dev/stdin', 'utf8')
const input = gInput.split('\n').map( line => line.split(' ').map( s => parseInt(s)))

for(let nums of input){
    const [a,b] = nums.sort((x,y)=> x-y)
    if( a ===  0 && b === 0 ){ break }
    console.log(`${a} ${b}`)
}


