#include <bits/stdc++.h>
int n;
char s[1010];
int a[1010];
int rev(int x) {
  int ret = 0;
  for (int i = 0; i < 8; i++) {
    ret = (ret << 1) | (x & 1);
    x >>= 1;
  }
  return ret;
}
int main() {
  gets(s);
  n = strlen(s);
  for (int i = 0; i < n; i++) {
    int prev = (i == 0) ? 0 : rev(s[i - 1]);
    int x = rev(s[i]);
    a[i] = (prev - x + 256) % 256;
  }
  for (int i = 0; i < n; i++) printf("%d\n", a[i]);
  return 0;
}
