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