#include <bits/stdc++.h>
using namespace std;
struct __s {
  __s() {
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    if (!1)
      fprintf(stderr, "Execution time: %.3lf s.\n",
              (double)clock() / CLOCKS_PER_SEC);
    long long n;
    cin >> n;
  }
} __S;
int main(void) {
  long long n;
  cin >> n;
  long long k = 32;
  while (n) {
    while (n < (1LL << k)) k--;
    cout << k + 1 << " ";
    n -= (1LL << k);
  }
  cout << '\n';
  return 0;
}
