'use strict';
(function(stdin) {
  var lines  = stdin.toString().split('\n');
  var result = (function(data) {
  	var result = [];
  	var index = 0;
  	while(true) {
  		var cols = data[index++].split(' ').map(Number);
  		if (cols.every(function(v){
  			return v === 0;
  		})) break;

  		result.push(cols.sort(function(a,b){
  			return a - b;
  		}).join(' '));
  	}
  	return result.join('\n');
  }(lines
  ));
  console.log(result);
}(require('fs').readFileSync('/dev/stdin', 'utf8')));