#include <bits/stdc++.h>
using namespace std;
int n, i, ys, l;
int a[1002] = {0};
int main() {
  cin >> n;
  for (l = 0; n; l++) {
    ys = n & 1;
    a[l] = ys;
    n >>= 1;
  }
  for (l--; l >= 0; l--)
    if (a[l]) printf("%d ", l + 1);
  return 0;
}
