#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bitset<17> bit;
  bit = n;
  for (int i = bit.size() - 1; i >= 0; i--) {
    if (bit[i] == 1) {
      cout << i + 1 << " ";
    }
  }
}
