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