#include <bits/stdc++.h>
using namespace std;
mt19937 nima(time(0));
const long long max_n = 1e2 + 20, MOD = 1e9 + 7;
long long mx, ans, cnt, sum, R, L, r, l, v1, v2;
long long a[max_n][max_n], b[max_n];
bool mark[3 * max_n];
long long n, k, m, z, d, t;
string pass;
int32_t main() {
  cin >> n;
  long long tmp = 1;
  while (n) {
    tmp = 1, ans = 0;
    while (tmp <= n) tmp *= 2, ans++;
    tmp /= 2;
    n -= tmp;
    cout << ans << " ";
  }
  return 0;
}
