#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, p, ans[1003];
  ;
  cin >> n;
  j = 1;
  p = n;
  while (p > 0) {
    int k = p % 2;
    ans[j++] = k;
    p = p / 2;
  }
  for (i = j - 1; i >= 1; i--) {
    if (ans[i] == 1) {
      cout << i << " ";
    }
  }
  return 0;
}
