#include <bits/stdc++.h>
using namespace std;
int reverse(int a) {
  int ret = 0;
  for (int i = 0; i < 8; i++) {
    if (a & (1 << i)) {
      ret += (1 << (7 - i));
    }
  }
  return ret;
}
int main() {
  int i, j, n, m, t;
  char ch, pch = 0;
  while ((ch = getchar()) != EOF) {
    if (ch < 32 || ch > 126) break;
    int a, b, c;
    a = reverse(pch);
    pch = ch;
    b = reverse(ch);
    c = (a - b + 256) % 256;
    printf("%d\n", c);
  }
  return 0;
}
