#include <bits/stdc++.h>
using namespace std;
int v[100010];
int main() {
  int n, i, j;
  cin >> n;
  int k = n;
  v[0] = 1;
  for (i = 1, j = 1; i < n; i++) {
    v[j] = 1;
    while (v[j] == v[j - 1]) {
      v[--j]++;
    }
    j++;
  }
  cout << v[0];
  for (int i = 1; i <= j - 1; ++i) {
    cout << " " << v[i];
  }
  cout << endl;
  return 0;
}
