#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  char ss[105];
  gets(ss);
  s = ss;
  int now, que[9], ans, num, pre = 0;
  for (int i = 0; i < s.size(); i++) {
    now = int(s[i]);
    num = 0;
    memset(que, 0, sizeof(que));
    while (now) {
      que[num++] = now % 2;
      now /= 2;
    }
    ans = 0;
    for (int i = 0; i < 8; i++) ans = ans * 2 + que[i];
    printf("%d\n", (pre + 256 - ans) % 256);
    pre = ans;
  }
}
