#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, last;
char p[1000];
int main() {
  gets(p);
  for (i = 0; p[i]; i++) {
    n = p[i];
    k = 0;
    for (j = 0; j < 8; j++, n /= 2) k = k * 2 + n % 2;
    printf("%d\n", (last - k + 256) % 256);
    last = k;
  }
  return 0;
}
