#include <bits/stdc++.h>
using namespace std;
char s[111];
int main() {
  gets(s);
  int last = 0, len = strlen(s);
  for (int i = 0; i < len; i++) {
    int x = s[i], now = 0;
    for (int j = 7; j >= 0 && x; j--, x >>= 1) now += (1 << j) * (x & 1);
    printf("%d\n", (last - now + 256) % 256);
    last = now;
  }
  return 0;
}
