#include <bits/stdc++.h>
char s[1000];
int prev[1000];
int n;
int main() {
  gets(s);
  n = strlen(s);
  char tmp[10];
  prev[0] = 0;
  for (int i = 0; i < n; i++) {
    int res = 0;
    int x = s[i];
    for (int j = 0; j < 8; j++) {
      if (x % 2 == 1) res += (1 << (8 - j - 1));
      x /= 2;
    }
    prev[i + 1] = res;
    res = prev[i] - res;
    res %= 256;
    if (res < 0) res += 256;
    printf("%d\n", res);
  }
}
