#include<iostream>
using namespace std;
int main(){
int n,b[10],f,i;
while(cin>>n){
for(i=0;i<9;i++){b[i]=n%2;n/=2;}
for(f=0,n=1,i=0;i<9;i++){
if(b[i]==1){
if(f==0){cout<<n;f=1;}
else cout<<" "<<n;
}
n*=2;
}
cout<<endl;
}
return 0;
}