require('fs').readFileSync(0, 'UTF-8').split('\n').some(input => {
  const [x, y] = input.trim().split(' ').map(Number)
  if (x === 0 && y === 0) { return true }
  if (x < y) {
    console.log(x, y)
  } else {
    console.log(y, x)
  }
})

