#include <bits/stdc++.h>
using namespace std;
string s, v;
int ans, p, t;
char c;
char tr[1000];
int mypow(int k) {
  int c = 1;
  for (int i = 1; i <= k; i++) {
    c *= 2;
  }
  return c;
}
int main() {
  gets(tr);
  s = (string)tr;
  p = 0;
  for (int i = 0; i < s.length(); i++) {
    v = "";
    c = s[i];
    int k = 7;
    ans = 0;
    while ((c > 0) && (k >= 0)) {
      if (c % 2 == 1) ans += mypow(k);
      k--;
      c /= 2;
    }
    t = (p - ans) % 256;
    if (t < 0) t += 256;
    cout << t << endl;
    p = ans;
  }
  return 0;
}
