#include <bits/stdc++.h>
using namespace std;
int i, j, k, l, a[1000009], r, b[1000009], ans, cn, t, n, m, x, y, z;
char c[1000009], ch, d[1000009];
int main() {
  while (gets(c)) {
    l = strlen(c);
    x = 0;
    for (i = 0; i < l; i++) {
      n = c[i];
      m = 0;
      for (j = 0; j < 8; j++) {
        r = n % 2;
        n /= 2;
        m += (r * pow(2, 7 - j));
      }
      a[i] = (256 + x - m) % 256;
      x = m;
    }
    for (i = 0; i < l; i++) {
      printf("%d\n", a[i]);
    }
  }
  return 0;
}
