#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, len, sum, re, a, b, ss[10];
  char st[102];
  gets(st);
  len = strlen(st);
  sum = 0;
  for (i = 0; i < len; i++) {
    memset(ss, 0, sizeof(ss));
    a = st[i];
    j = 0;
    while (a) {
      ss[j] = a % 2;
      j++;
      a = a / 2;
    }
    b = 0;
    for (j = 0; j < 8; j++) {
      b = b * 2 + ss[j];
    }
    re = (sum + 256 - b) % 256;
    sum = b;
    cout << re << endl;
  }
  return 0;
}
