#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> arr;
int main() {
  cin >> n;
  int ind = 1;
  while (n) {
    if (n & 1) {
      arr.push_back(ind);
    }
    n >>= 1;
    ind++;
  }
  for (int i = arr.size() - 1; i >= 0; i--) {
    cout << arr[i] << " ";
  }
  cout << "\n";
}
