#include <bits/stdc++.h>
using namespace std;
const long long INF = 2e18;
const int INFINT = 2e9;
const int N = 1000006;
const int NN = 1006;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < 32; i++) {
    if ((1 << i) & n) v.push_back(i + 1);
  }
  for (int i = v.size() - 1; i >= 0; i--) cout << v[i] << ' ';
}
