#include <iostream>
#include <math.h>
using namespace std;

int main() {
int n,m;
while(cin>>n){
	m=0;
	int wa=2;
	for (int k=0;k<=10;k++){
		if(n%wa!=0){
			if(m!=0){
				cout<<" ";
			}
			cout<<wa/2;
			n=n-wa/2;
			m=m+1;
		}
	wa=wa*2;
}
cout<<endl;
}
	return 0;
}