while buf=gets
        n=buf.to_i
        s=[]
        while n>0
                0.upto(9){|i|
                        if 2**i>n
                                s<<2**(i-1)
                                n-=2**(i-1)
                                break
                        end
                }
        end
        puts s.sort.join(' ')
end