#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
  int x;
  while (scanf("%d ", &x) == 1) {
    int omori = 512;
    while (x != 0)
      if (x % omori == 0) {
	x -= omori;
	cout << omori << " ";
	omori /= 2;
      }
    }
  }
  return 0;
}