#include using namespace std; #define int long long typedef pair P; int INF = 1e9+7; int mod = 1e9+7; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; signed main() { int N; cin >> N; cout << 1; int ans = 2; while(ans+1 <= N) { cout << " " << ans+1; ans*=2; } cout << endl; }