#include <bits/stdc++.h>
using namespace std;
int n;
int tim(int n) {
  int res = 0;
  for (int i = 0; 1 << i <= n; ++i) res = i;
  return res;
}
int main() {
  cin >> n;
  while (n > 0) {
    int x = tim(n);
    cout << x + 1 << " ";
    n -= 1 << x;
  }
  return 0;
}
