#include <bits/stdc++.h>
int n, a;
char s[100005];
void work() {
  int i, b[8];
  for (i = 0; i < 8; i++) {
    b[i] = n & 1;
    n >>= 1;
  }
  for (i = 0; i < 8; i++) n = n * 2 + b[i];
  printf("%d\n", (a - n + 256) % 256);
  a = n;
}
int main() {
  gets(s);
  for (int i = 0; s[i]; i++) {
    n = s[i] - 0;
    work();
  }
  return 0;
}
