#include <bits/stdc++.h>
using namespace std;
vector<int> v;
void solve(int n) {
  int m = 1;
  while (n > 0) {
    if (n & 1) v.push_back(m);
    n >>= 1;
    m++;
  }
  reverse(v.begin(), v.end());
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  solve(n);
  for (auto it : v) {
    cout << it << " ";
  }
  cout << "\n";
  return 0;
}
