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

while (line = raw.shift())
{
    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());
}