#include <bits/stdc++.h>
using namespace std;
vector<int> vec;
int main() {
  int n, i;
  cin >> n;
  for (i = 0; i < n; i++) vec.push_back(1);
  i = 0;
  while (i < vec.size() - 1) {
    if (vec[i] == vec[i + 1]) {
      vec[i] = vec[i] + 1;
      vec.erase(vec.begin() + (i + 1));
      i = 0;
      continue;
    } else
      i++;
  }
  for (i = 0; i < vec.size(); i++) {
    cout << vec[i] << " ";
  }
  return 0;
}
