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