line = require('fs').readFileSync('/dev/stdin', 'ascii').split("\n");
end = line.lastIndexOf('0 0');
line = line.slice(0, end);
(function() {
	var ary, a, b, format;
	format = require('util').format;
	for (i in line) {
		ary = line[i].split(" ", 2);
		a = parseInt(ary[0], 10);
		b = parseInt(ary[1], 10);
		if (a < b) line[i] = format('%d %d', a, b);
		else line[i] = format('%d %d', b, a);
	}
}) ();
console.log(line.join("\n"));