#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  int n;
  cin >> n;
  while (n > 1) {
    int p = 1, k = 1;
    while (n >= p * 2) p *= 2, k++;
    cout << k << " ";
    n -= p;
  }
  if (n > 0) cout << n;
}
