#include <bits/stdc++.h>
using namespace std;
map<char, string> M;
string cc(int sum) {
  string t;
  while (sum != 0) {
    t.push_back(sum % 2 + '0');
    sum /= 2;
  }
  while (t.size() < 8) t.push_back('0');
  reverse(t.begin(), t.end());
  return t;
}
int conv(string s) {
  string t;
  int sum = 0;
  for (int i = 0; i < s.size(); i++) {
    sum = sum * 2 + s[i] - '0';
  }
  return sum;
}
int main() {
  string s;
  while (getline(cin, s)) {
    int ant = 0;
    for (int i = 0; i < s.size(); i++) {
      string t = cc((int)s[i]);
      string r = t;
      reverse(r.begin(), r.end());
      int xx = conv(r);
      printf("%d\n", (ant - xx + 256) % 256);
      ant = xx;
    }
  }
}
