#include <bits/stdc++.h>
using namespace std;
int i, j, k, l, m, n, h;
int a[100005];
int main() {
  scanf("%d", &n);
  h = 0;
  for (i = 1; i <= n; i++) {
    h++;
    a[h] = 1;
    for (; h > 0 && a[h] == a[h - 1];) {
      h--;
      a[h]++;
    }
  }
  for (i = 1; i <= h; i++) printf("%d ", a[i]);
}
