#include <bits/stdc++.h>
using namespace std;
const int M = 200;
const int N = 100200;
const int kind = 26;
const int inf = 1 << 29;
const double eps = 1e-6;
const double pi = acos(-1.0);
const double sq2 = sqrt(2.0);
char s[M];
int stac[20];
int cal(char s) {
  int t = s;
  int top = 0;
  while (t) {
    int tmp = t % 2;
    stac[top++] = tmp;
    t /= 2;
  }
  if (top < 7) stac[top++] = 0;
  int ans = 0;
  for (int i = top - 1; i >= 0; i--) {
    int tmp = 1;
    if (stac[i]) {
      for (int j = 0; j < 7 - i; j++) tmp *= 2;
      ans += tmp;
    }
  }
  return ans;
}
int main() {
  while (gets(s)) {
    int res = 0;
    for (int i = 0; s[i]; i++) {
      int tmp = cal(s[i]);
      printf("%d\n", (res - tmp + 256) % 256);
      res = tmp;
    }
  }
  return 0;
}
