#include <bits/stdc++.h>
using namespace std;
int n, a[100011], p = 0;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    a[p] = 1;
    while (p > 0 && a[p] == a[p - 1]) {
      a[p - 1]++;
      p--;
    }
    ++p;
  }
  for (int i = 0; i < p; i++) cout << a[i] << " ";
}
