#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  int c = 0;
  for (int i = 0; i < s.size(); i++) {
    int code = int(s[i]), k = 128, ans = 0;
    while (code > 0) {
      ans += (code % 2) * k;
      k /= 2;
      code /= 2;
    }
    cout << (256 + c - ans) % 256 << endl;
    c = ans;
  }
  return 0;
}
