"use strict";
process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
    lines.push(line)
});

reader.on('close', () => {
    lines.forEach(function (line) {
	if (line==="0 0") {
	    return;
	}
	var l = line.trim().split(' ').map(x=>parseInt(x));
	console.log(l.sort((a,b)=>a-b).map(x=>x.toString()).join(' '));
    })
});
