#include <bits/stdc++.h>
int main() {
  char c;
  int old = 0;
  while (scanf("%c", &c) != EOF && c >= 32 && c <= 126) {
    int i = 1, k = c, now = 0;
    for (i = 1; i <= 8; i++) {
      now = (now * 2 + k % 2) % 256;
      k /= 2;
    }
    printf("%d\n", (old - now + 256) % 256);
    old = now;
  }
  return 0;
}
