#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000005;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> res;
  int paso = 1;
  while (n) {
    if (n & 1) res.push_back(paso);
    paso++;
    n >>= 1;
  }
  for (int i = res.size() - 1; i >= 0; i--) printf("%d ", res[i]);
  printf("\n");
  return 0;
}
