#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n != 0) {
    int a = log2(n);
    cout << a + 1 << " ";
    int b = pow(2, a);
    n = n % b;
  }
  return 0;
}
