#include <bits/stdc++.h>
using namespace std;
int ans[33], n, k, i, nom;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  while (n > 0) {
    nom++;
    if (n % 2 != 0) {
      k++;
      ans[k] = nom;
    }
    n /= 2;
  }
  reverse(ans + 1, ans + 1 + k);
  for (i = 1; i <= k - 1; i++) cout << ans[i] << " ";
  cout << ans[k] << '\n';
  return 0;
}
