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