#include <bits/stdc++.h>
int main(void) {
  int n, i;
  scanf("%d", &n);
  int num, max = 0;
  for (num = 1; num <= n; num *= 2, max++)
    ;
  for (i = max - 1; i >= 0; i--) {
    if (n & (1 << i)) printf("%d ", i + 1);
  }
  return 0;
}
