#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long LL;
vector<LL> v;
int main(void)
{
LL n;
cin >> n;
while(n)
{
v.push_back(n);
n /= 2;
}
for(auto e : v) cout << e << " ";
puts("");
}