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