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