#include <bits/stdc++.h>
using namespace std;
int n, k, num;
int main() {
  cin >> n;
  int a = 1;
  while (a < n) {
    a = a << 1;
    k++;
  }
  for (int i = k; i >= 0; i--) {
    num = n >> i;
    if (num % 2 == 1) cout << i + 1 << ' ';
  }
  return 0;
}
