#include <iostream>
using namespace std;

int main() {
  int w = 0;
  while (cin >> w, w) {
    for(int i = 0; i < 32; i++) {
      if(w & (1<<i)) {
        cout << (1 << i) << " ";
      }
    }
    w = 0;
    cout << endl;
  }
}