function main(input){
    let lines = input.split("\n");
    let i=0;
    while(lines[i]!=="0 0"){
        let nums = lines[i].split(" ");
        let put="";
        if(parseInt(nums[0])>parseInt(nums[1])){
            put=nums[1]+" "+nums[0];
        }else{
            put=nums[0]+" "+nums[1];
        }
        console.log(put);
        i++;
        
    }
    
    
}


main(require("fs").readFileSync("/dev/stdin","utf-8"));
