#include <bits/stdc++.h>
using namespace std;
int a[1000];
int main() {
  int n, x, i = 0, j = 0, p, cnt;
  cin >> n;
  x = n;
  while (x != 0) {
    p = 1, cnt = 0;
    while (p <= x) {
      p = p * 2;
      cnt++;
    }
    a[i] = cnt;
    x = x - p / 2;
    i++;
  }
  for (j = 0; j < i; j++) cout << a[j] << " ";
  return 0;
}
