#include <bits/stdc++.h>
using namespace std;
int a, i, ans, per1, j, l, cur, per;
int c[10000];
string s;
int main() {
  getline(cin, s);
  for (i = 0; i < s.size(); i++) {
    a = s[i];
    l = 0;
    while (a != 0) {
      l++;
      c[l] = a % 2;
      a = a / 2;
    }
    l = 8;
    for (j = 1; j <= l / 2; j++) swap(c[j], c[l - j + 1]);
    ans = 0;
    cur = 1;
    for (j = 1; j <= l; j++) {
      ans += cur * c[j];
      cur *= 2;
    }
    for (j = 1; j <= 8; j++) c[j] = 0;
    per1 = ans;
    ans = (256 + per - ans) % 256;
    per = per1;
    cout << ans << endl;
  }
}
