#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, a;
  cin >> x;
  a = x;
  vector<int> v;
  do {
    v.push_back(x % 2);
    x = x / 2;
  } while (x > 0);
  for (int i = v.size() - 1; i >= 0; i--) {
    if (v[i] == 1) {
      if (a % 2 == 0) {
        cout << i + 1 << " ";
      } else {
        cout << i + 1 << " ";
      }
    }
  }
}
