#include <bits/stdc++.h>
using namespace std;
int main() {
  char c;
  int ant = 0;
  int mod = 256;
  while ((c = getchar()) != EOF) {
    if (c < 32 || c > 126) continue;
    vector<int> v;
    for (int i = 0; i < (int)(8); i++) {
      v.push_back(c % 2);
      c /= 2;
    }
    int ans = 0;
    for (int i = 0; i < (int)(8); i++) {
      ans *= 2;
      ans += v[i];
    }
    int salvo = ans;
    ans = (((ant - ans) % mod) + mod) % mod;
    printf("%d\n", ans);
    ant = salvo;
  }
  return 0;
}
