#include <bits/stdc++.h>
int bitrev(int x) {
  int i, y = 0;
  for (i = 0; i < 8; i++, x /= 2) y = y * 2 + x % 2;
  return y;
}
int main(int argc, char *argv[]) {
  int a[1024];
  char c;
  int i, x, n, p = 0;
  for (n = 0; scanf("%c", &c) == 1;)
    if (c >= 32 && c <= 126) a[n++] = c;
  for (i = 0; i < n; i++) {
    p = bitrev(p);
    p = ((p - bitrev(a[i])) + 256) % 256;
    printf("%d\n", p);
    p = a[i];
  }
  return 0;
}
