#include <bits/stdc++.h>
int comp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int min(int a, int b) { return a < b ? a : b; }
int max(int a, int b) { return a > b ? a : b; }
int rev(int n) {
  int r = 0;
  for (int i = 0; i < 8; i++) r = r | (((n >> i) & 1) << (7 - i));
  return r;
}
char c;
int n;
int main() {
  int p = 0, t;
  while (1) {
    scanf("%c", &c);
    if (c < 32 || c > 126) break;
    t = (256 + rev(p) - rev(c)) % 256;
    p = c;
    printf("%d\n", t);
  }
  return 0;
}
