#include <bits/stdc++.h>
using namespace std;
long long n,ans,j = 1;
int main(){
cin>>n;
if(n%2==1){
ans = -1;
cout<<ans;
return 0;
}
while(pow(2,j)<10000000){
if(pow(2,j)==n){
ans = n;
cout<<ans;
return 0;
}
j++;
}
while(n>=2){
int tmp = 1;
while(pow(2,tmp)<=n){
tmp+=1;
}
ans = pow(2,(tmp-1));
n-=ans;
cout<<ans<<" ";
}
return 0;
}