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