'use strict';
(function(stdin) {

  var inputs  = stdin.toString().trim().split('\n');
  var EOF = inputs.indexOf('0 0');
  var matrics = inputs.slice(0, EOF).map(function(v) {
    return v.split(' ').map(Number);
  });

  matrics.map(function(v){
    return v.sort(function(a, b){ return a - b;})
  });

  function print(line){
  return line.map(function(v){return v.join(' ');}).join('\n');
    }

  console.log(print(matrics));

}(require('fs').readFileSync('/dev/stdin', 'utf8')));