#include <iostream>

int main() {
    unsigned x;
    std::cin >> x;

    unsigned bits = 7;
    while ((x >> bits) != 0 && bits < 32) {
        bits += 7;
    }

    while (bits > 7) {
        bits -= 7;
        std::cout << (128 | ((x >> bits) & 127)) << " ";
    }

    std::cout << (x & 127) << "\n";
    return 0;
}
