#include<iostream> using namespace std; int main(){ long long int n; cin>>n; for(long long int i=n;i>=0;i/=2)if(i>0)cout<<i<<" ";else break; return 0; }