#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-11;
const int INFINITE = 0x3f3f3f3f;
template <class T>
inline void checkmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void checkmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline T lowbit(T n) {
  return (n ^ (n - 1)) & n;
}
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
template <class T>
inline T gcd(T a, T b) {
  T c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}
typedef vector<int> VI;
typedef vector<VI> VII;
typedef vector<string> VS;
inline void solve() {
  int n;
  scanf("%d", &n);
  bool f = true;
  for (int i = 20; i >= 0; i--) {
    if ((n & (1 << i)) > 0) {
      if (f)
        f = false;
      else
        printf(" ");
      printf("%d", i + 1);
    }
  }
  printf("\n");
}
int main() {
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
