#include <bits/stdc++.h>
int main() {
  char str[110];
  while (gets(str)) {
    for (int i = 0; i < strlen(str); i++) {
      int x[110];
      int b[8] = {0};
      int a = (int)str[i];
      for (int j = 0; j <= 7; j++) {
        b[j] = a % 2;
        a /= 2;
      }
      int sum = 0;
      for (int k = 0; k <= 7; k++) sum += b[k] * pow(2, 7 - k);
      x[i] = sum;
      if (i == 0)
        printf("%d\n", (0 - sum + 256) % 256);
      else
        printf("%d\n", (x[i - 1] - sum + 256) % 256);
    }
  }
  return 0;
}
