//var raw = require("fs").readFileSync("/dev/stdin", "utf8").toString().trim().split('\n');
//var line;
//while (line = raw.shift())

process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on("data", function(raw) {
    raw.trim().split("\n").some(function(line) {
        var bin = parseInt(line, 2).toString();
        var out = "";
        
        for (var i = bin.length - 1; i >= 0; i--)
            if (bin.charAt(i) == '1')
                out += Math.pow(2, bin.length - 1 - i).toString() + " ";
        
        console.log(out.trim()); 
    });
});