#include <bits/stdc++.h>
using namespace std;
long long bigmod(long long b, long long p) {
  if (p == 0) return 1;
  long long my = bigmod(b, p / 2);
  my *= my;
  my %= 1000000007;
  if (p & 1) my *= b, my %= 1000000007;
  return my;
}
int setb(int n, int pos) { return n = n | (1 << pos); }
int resb(int n, int pos) { return n = n & ~(1 << pos); }
bool checkb(int n, int pos) { return (bool)(n & (1 << pos)); }
long long n, ara[1000000];
int main() {
  long long i;
  scanf("%lld", &n);
  long long idx = 0;
  for (i = 1; i <= n; i++) {
    idx++;
    ara[idx] = 1;
    while (ara[idx] == ara[idx - 1]) {
      idx--;
      ara[idx]++;
    }
  }
  for (i = 1; i <= idx; i++) {
    if (i > 1) printf(" ");
    printf("%lld", ara[i]);
  }
  printf("\n");
  return 0;
}
