#include <bits/stdc++.h>
using namespace std;
const int mod = 256;
int two[22];
char s[100010];
int main() {
  two[0] = 1;
  for (int i = 1; i <= 10; ++i) two[i] = two[i - 1] * 2;
  gets(s);
  int next = 0, last = 0;
  for (int i = 0, len = strlen(s); i < len; ++i) {
    int now = s[i], t = 7;
    next = 0;
    while (now) {
      if (now & 1) next += two[t];
      now /= 2;
      t--;
    }
    cout << (last - next + mod) % mod << endl;
    last = next;
  }
  return 0;
}
