#include <bits/stdc++.h>
using namespace std;
void a(int n) {
  int b = 0;
  if (n == 0)
    return;
  else if (n == 1) {
    cout << "1 ";
    return;
  } else {
    b = (int)(floor(log2(n)));
    cout << b + 1 << " ";
    a(n - (int)(pow(2, b)));
  }
}
int main() {
  int n;
  cin >> n;
  a(n);
}
