#include <iostream>

using namespace std;

void output(int num){
  static bool flag=true;
  if(num == -1){
    flag=true;
    cout << endl;
  }  
  else if(flag){
    cout << num;
    flag=false;
  }
  else
    cout << " " << num;
}

void func(int weight){
  if(weight > 0){
    int buf=1;
    while(buf <= weight)
      buf <<= 1;
    buf >>=1;
    output(buf);
    func(weight-buf);
  }
}

int main(){
  int buf;
  while(cin >> buf){
    func(buf);
    output(-1);
  }
  return 0;
}