#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
  int n;
  int square[]={1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
  vector<int> num;

  while(cin >> n){
    if(n == 0 || n > 1023){
      cout << "error" << endl;
      break;
    }

    for(int i = 9; i >= 0; i--){
      if(n >= square[i]){
        num.push_back(i);
        n -= square[i];
      }
    }

    for(int i = num.size() - 1; i >= 0; i--){
      cout << square[ num[i] ];
      if(i = 0) cout << endl;
      else      cout << " ";
    }
    
    num.clear();
  }
  
}