#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> K;
  int x = 0;
  for (int i = 30; i >= 0; i--) {
    if (n & (1 << i)) K.push_back(i);
  }
  for (int i = 0; i < K.size(); i++) cout << K[i] + 1 << " ";
  return 0;
}
