#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int64_t n;
  cin >> n;
  vector<int64_t> bits;
  int64_t b = 1;
  while (n > 0) {
    if (n % 2) {
      bits.push_back(b);
    }
    n /= 2;
    b++;
  }
  for (int64_t i = (int64_t)bits.size() - 1; i >= 0; i--) {
    cout << bits[i] << " ";
  }
  cout << "\n";
  return 0;
}
