let content = '';
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', buf => {
  content += buf;
});
process.stdin.on('end', () => {
  const nums = content
    .trim()
    .split('\n')
    .map(line =>
      line
        .split(' ')
        .map(n => parseInt(n, 10))
        .sort((a, b) => a - b)
    )
    .filter(([fst, snd]) => fst !== 0 || snd !== 0);
  nums.forEach(pair => console.log(pair.join(' ')));
});
