///////////////////////////////    _LeMur_
#define _CRT_SECURE_NO_WARNINGS
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <complex>
#include <cassert>
#include <cfloat>
#include <memory>
#include <chrono>
#include <random>
#include <climits>
#include <limits>
#include <bitset>
#include <cstdio>
#include <vector>
#include <string>
#include <stack>
#include <tuple>
#include <queue>
#include <ctime>
#include <cmath>
#include <list>
#include <map>
#include <set>

using namespace std;

const int N = 1000005;
const int inf = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 7;
// mt19937 myrand(chrono::steady_clock::now().time_since_epoch().count());
mt19937 myrand(373);

int T;
int n;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  cin >> n;

  if (n == 0) {
    cout << 0 << endl;
    return 0;
  }

  vector <int> x;
  while (n > 0) {
    x.push_back(n % 128);
    n /= 128;
  }

  for (int i = 1; i < (int)x.size(); i++) {
    x[i] += 128;
  }
  
  reverse(x.begin(), x.end());

  for (int v: x) {
    cout << v << " ";
  }
  cout << endl;
  return 0;
}
