#include <bits/stdc++.h>
char sz[102];
char tm[102];
int main() {
  int i, j;
  char cc;
  gets(sz);
  for (i = 0; sz[i] != '\0'; i++) {
    for (j = 0; j < 8; j++)
      if (sz[i] & 1 << j) tm[i] |= 1 << (7 - j);
  }
  int d = 0;
  int tmp;
  for (i = 0; sz[i] != '\0'; i++) {
    tmp = d - tm[i];
    tmp = (tmp + 256) % 256;
    printf("%d\n", tmp);
    d = tm[i];
  }
}
