var x = require('fs').readFileSync('/dev/stdin/', 'utf8');
var row = x.split("\n");
for (var index in row){
    var i = row[index].split(" ").map(Number);
    var a = i[0]; b = i[1];
    if (a === 0 && b === 0) break; 
    else {
        console.log(i.sort(function(a, b){return a - b}).join(" "));
    }
}

