#include <iostream>

int main() {
	int w;
	while (std::cin >> w) {
		bool f = false;
		for (int s = 1; s <= 512; s <<= 1, w >>= 1) {
			if ((w & 1) != 0) {
				if (f) { std::cout << ' '; }
				else { f = true; }
				std::cout << s;
			}
		}
		std::cout << std::endl;
	}
	return 0;
}