const input = require('fs').readFileSync('/dev/stdin', 'UTF-8');

const swappingTwoNumbers = input => {
  const arr = input.split('\n');
  let result = [];

  arr.forEach(val => {
    const innerArr = val
      .split(' ')
      .map(Number)
      .sort((a, b) => a - b);

    if (innerArr.some(val => val !== 0)) {
      result.push(String(innerArr.join(' ')));
    }
  });

  console.log(result.join('\n'));
};

swappingTwoNumbers(input);

