#include <cstdio>
#include <vector>

using namespace std;

int main()
{
	int n;
	while(scanf("%d",&n)!=EOF){
		vector<int> v;
		for(int i=512;1<=i;i/=2){
			if(n<i) continue;
			n-=i;
			v.push_back(i);
			if(n<=0)break;
		}
		for(int i=v.size()-1;0<=i;i--){
			printf("%d",v[i]);
			if(i==0)printf("\n");
			else printf(" ");
		}
	}
	return 0;
}