#include <bits/stdc++.h>
int main() {
  static char cc[100 + 1];
  static int rev[(1 << 8)];
  int n, a, b, i;
  for (a = 0; a < (1 << 8); a++) {
    b = 0;
    for (i = 0; i < 8; i++)
      if (a & 1 << i) b |= 1 << 7 - i;
    rev[a] = b;
  }
  fgets(cc, 128, stdin), n = strlen(cc) - 1;
  for (i = 0; i < n; i++)
    printf("%d\n",
           (rev[i == 0 ? 0 : (int)cc[i - 1]] - rev[(int)cc[i]] + (1 << 8)) %
               (1 << 8));
  return 0;
}
