#include <iostream>
using namespace std;
int main() {
long long n;
cin >> n;
long long x=1;
while (x<=n) {
cout<<x<<endl;
x*=2;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglsb25nIGxvbmcgbjsKICAgIGNpbiA+PiBuOwogICAgbG9uZyBsb25nIHg9MTsKICAgIHdoaWxlICh4PD1uKSB7CiAgICAJY291dDw8eDw8ZW5kbDsKICAgIAl4Kj0yOwogICAgfQogICAgcmV0dXJuIDA7Cn0=