#include <bits/stdc++.h>
using namespace std;
const int maxn = 100050;
int n, i, a[maxn], now;
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    a[++now] = 1;
    while (a[now] == a[now - 1]) a[--now]++;
  }
  for (i = 1; i <= now; i++) printf("%d ", a[i]);
  return 0;
}
