#include <iostream> int main() { unsigned int n; std::cin >> n; std::cout << "0 "; for (unsigned int s = 1; s <= n; s *= 2) { std::cout << s << ' '; } return 0; }