#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;
int s[N];
int main() {
  int n, top = 0;
  cin >> n;
  for (auto i = (1); i <= (n); i++) {
    s[++top] = 1;
    while (top > 1 && s[top] == s[top - 1]) s[--top]++;
  }
  for (auto i = (1); i <= (top); i++) cout << s[i] << " ";
}
