#include <bits/stdc++.h>
char s[105];
int rev(int n) {
  int t = 0;
  for (int i = 0; i < 7; i++) {
    t |= n & 1;
    t <<= 1;
    n >>= 1;
  }
  return t;
}
int main() {
  gets(s);
  int pre = 0;
  for (int i = 0; s[i]; i++) {
    int t = s[i];
    t = rev(t);
    int tt = (pre - t + 256) % 256;
    pre = rev(s[i]);
    printf("%d\n", tt);
  }
}
