#include <bits/stdc++.h>
using namespace std;
struct nout {
  template <class A>
  const nout& operator<<(const A& a) const {
    return *this;
  }
} nout;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long N;
  cin >> N;
  bool out = false;
  for (long long i__count = (20), i = i__count, i__goal = (0); i >= i__goal;
       i = --i__count) {
    if (N & (1 << i)) {
      cout << (out ? " " : "") << i + 1;
      out = true;
    }
  }
  cout << "\n";
  return 0;
}
