#include <bits/stdc++.h>
using namespace std;
int main() {
  string s = "", s2;
  while (cin >> s2) {
    s += s2;
    s += ' ';
  }
  int i, j, n = s.size() - 1, pre = 0;
  for (i = 0; i < n; i++) {
    int t = 0, u = s[i];
    for (j = 0; j < 8; j++) {
      t = t * 2 + u % 2;
      u /= 2;
    }
    cout << (pre + 256 - t) % 256 << endl;
    pre = t;
  }
  return 0;
}
