#include <bits/stdc++.h>
using namespace std;
int main() {
  int i = 1, a, x[1000], y = 0;
  cin >> a;
  while (a != 0) {
    if (a % 2) x[y++] = i;
    a /= 2;
    i++;
  }
  for (i = y - 1; i >= 0; i--) cout << x[i] << " ";
}
