#include <bits/stdc++.h>
using namespace std;
char s[128];
int rev(char x) {
  int i, a, b;
  for (i = 0; i < (4); ++i) {
    a = x & (1 << i);
    b = x & (1 << 7 - i);
    x &= ~((1 << i) | (1 << 7 - i));
    if (a) x |= 1 << 7 - i;
    if (b) x |= 1 << i;
  }
  return x;
}
int main() {
  gets(s);
  char x = 0;
  for (char* p = s; *p; ++p) {
    printf("%d\n", (rev(x) - rev(*p) + 256) % 256);
    x = *p;
  }
  return 0;
}
