#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
  while (true) {
    int omori = 512, x;
    scanf("%d", &x);
    do {
      if (x % omori == 0) {
	x -= omori;
	cout << omori << " ";
	omori /= 2;
      }
    } while (x != 0);
  }
  return 0;
}
#include <iostream>
#include <cstdio>

using namespace std;

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