#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
int main() {
  string s;
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < (int)s.size(); ++i) {
    int hoge = 0;
    for (int j = 0; j < (int)8; ++j)
      if (s[i] >> j & 1) hoge |= 1 << (7 - j);
    cout << (prev - hoge + 256) % 256 << endl;
    prev = hoge;
  }
}
