#include <bits/stdc++.h>
using namespace std;
int n, x[250];
char in[250];
int res(int x) {
  int re = 0;
  for (int i = 0; i < 8; i++) {
    re <<= 1;
    if (x & 1) re++;
    x >>= 1;
  }
  return re;
}
int main() {
  while (gets(in)) {
    n = strlen(in);
    for (int i = 0, fr; i < n; i++) {
      x[i] = res(in[i]);
      if (!i)
        fr = 0;
      else
        fr = x[i - 1];
      fr -= x[i];
      fr %= 256;
      fr += 256;
      fr %= 256;
      printf("%d\n", fr);
    }
  }
  return 0;
}
