#include <bits/stdc++.h>
char ch[111];
int main() {
  int n, i, j, aux, aux2;
  ch[0] = ' ';
  fgets(ch + 1, 105, stdin);
  n = strlen(ch) - 2;
  ch[0] = 0;
  for (j = 1, aux = 0; j <= n; ++j) {
    for (i = 0, aux = 0; i <= 7; ++i)
      aux += (((int)ch[j - 1] >> i) & 1) << (7 - i);
    for (i = 0, aux2 = 0; i <= 7; ++i)
      aux2 += (((int)ch[j] >> i) & 1) << (7 - i);
    aux2 = aux - aux2;
    if (aux2 < 0) aux2 += 256;
    printf("%d\n", aux2);
  }
  return 0;
}
