#include <bits/stdc++.h>
using namespace std;
int main() {
  long a, temp, counter = 0;
  cin >> a;
  temp = floor(log2(a));
  for (long i = temp; i >= 0; i--)
    if (a & (1 << i)) cout << i + 1 << ' ';
  return 0;
}
