#include <cstdio>
#include <cmath>
#include <stack>
#include <algorithm>
using namespace std;

int main() {
    int n;
    int arr[] = {512, 256, 128, 64, 32, 16, 8, 4, 2, 1};
    while(scanf("%d", &n) != EOF) {
        stack<int> s;
        for (int i = 0; i < 10; i++) {
            if (arr[i] <= n) { n-= arr[i]; s.push(arr[i]); }
        }
        int idx = 0;
        while (!s.empty()) {
            if (idx) printf(" ");
            printf("%d", s.top()); s.pop();
            idx++;
        }
        printf("\n");
    }

    return 0;
}

