#include <iostream>
using namespace std;
typedef long long LL;
int main()
{
LL n;
cin >> n;
while(n)
{
cout << n << " ";
n /= 2;
}
return 0;
}
#include <iostream>
using namespace std;
typedef long long LL;
int main()
{
LL n;
cin >> n;
while(n)
{
cout << n << " ";
n /= 2;
}
return 0;
}