#include <cstdio>

using namespace std;

int main() {
  int x;
  while (scanf("%d", &x) == 1) {
    int i = 0, ws[10];
    for (int n = 9; n >= 0; n--) {
      int w = 1 << n;
      if (x >= w) {
        x -= w;
        ws[i++] = w;
      }
    }
    while (i >= 2)
      printf("%d ", ws[--i]);
    printf("%d\n", ws[0]);
  }
  return 0;
}