#include <bits/stdc++.h>
int mirror(int c) {
  int r = 0;
  int i;
  const int ci = c;
  for (i = 0; i < 8; ++i) {
    r <<= 1;
    r += ((ci >> i) & 0x01);
  }
  return r;
}
void generate(const char *s) {
  int i;
  int r = 0;
  for (i = 0; s[i] >= 32 && s[i] <= 126; ++i) {
    int m = mirror(s[i]);
    r = (r - m + 1024) & 0xFF;
    printf("%d\n", r);
    r = m;
  }
}
int main() {
  char s[128] = {0};
  fread(s, sizeof(s[0]), 128, stdin);
  generate(s);
  return (0);
}
