#include<cstdio>
#include<stack>

using namespace std;

const int weight[10] ={1,2,4,8,16,32,64,128,256,512};

int main(void){
	int n;
	while(scanf("%d", &n) != EOF){
		stack<int> s;
		
		for(int i = 9; i >= 0; i--){
			if(n >= weight[i]){
				n-=weight[i];
				s.push(weight[i]);
			}
		}
		while(!s.empty()){
			printf("%d",s.top());
			s.pop();
			if(!s.empty())printf(" ");
		}
		puts("");
	}
	return 0;
}