#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int res[200] = {0};
  int i = 0;
  int a = 1;
  while (n > 0) {
    if (n % 2 == 1) {
      res[i++] = a;
    }
    a++;
    n /= 2;
  }
  int t = 0;
  for (--i; i >= 0; i--) {
    if (t != 0)
      cout << " ";
    else {
      t++;
    }
    cout << res[i];
  }
  cout << endl;
  return 0;
}
