#include <stdio.h>
 
int main(void) {
  int weight, input;
  int i = 0;
  int out[10] = {0};
  int j;
 
  while(scanf("%d", &input) != EOF) {
    weight = 1024;
 
    while(weight = weight / 2) {
      if(input / weight) {
	out[i] = weight;
	i++;
      }
 
      input = input % weight;
    }
 
    while(out[i]) i++;
         
    for(j = 0; i - 1 - j > 0; j++)
      printf("%d ", out[i - 1 - j]);
    printf("%d\n", out[0]);
  }
 
  return 0;
}