#include <bits/stdc++.h>
int last, x;
int val[111];
char s[111];
int calc(int v) {
  for (int i = 0; i < 8; i++) {
    val[i] = v % 2;
    v /= 2;
  }
  int res = 0;
  for (int i = 0; i < 8; i++) res = res * 2 + val[i];
  return res;
}
int main() {
  gets(s);
  last = 0;
  for (int i = 0; s[i]; i++) {
    x = calc(s[i]);
    printf("%d\n", (last - x) >= 0 ? (last - x) : (last - x + 256));
    last = x;
  }
  return 0;
}
