#include <bits/stdc++.h>

using namespace std;
using ll = long long;
// #define int long long
using ld = long double;

#define all(v) (v).begin(), (v).end()
#define db(x) cerr << #x << " = " << x << '\n'
#define mp make_pair
#define eb emplace_back
#define pb push_back
#define sz(v) (int)((v).size())
#define pw(x) (1LL << (int)(x))
#define fr(i, a, b) for (int i = (a); i <= (b); ++i)
#define rf(i, a, b) for (int i = (a); i >= (b); --i)
#define fe(x, y) for (auto &x: y)
#define fi first
#define se second

mt19937_64 rng(566);

ll rnd(ll l, ll r) {
    return rng() % (r - l + 1) + l;
}

template<typename T>
bool umn(T &a, T b) {
    return a > b ? a = b, 1 : 0;
}

template<typename T>
bool umx(T &a, T b) {
    return a < b ? a = b, 1 : 0;
}

template<typename T>
using ve = vector<T>;

using pii = pair<int, int>;
using pll = pair<ll, ll>;

const double eps = 1e-8;
const ll mod = 1e9 + 8;
const int inf0 = 1e9 + 10;
const ll inf = 2e18 + 10;

void solve();

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
#ifdef LC
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int t = 1;
    // cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}

void solve() {
    ll n;
    cin >> n;
    ve<int> parts;
    while (n >= 0) {
        if (n < 128) {
            parts.eb(n);
            break;
        } else {
            parts.eb(n % 128);
            n /= 128;
        }
    }
    reverse(all(parts));
    for (int i = 0; i < sz(parts); ++i) {
        if (i + 1== sz(parts)) {
            cout << parts[i] << '\n';
        } else {
            cout << parts[i] + 128 << ' ';
        }
    }
}