#include <bits/stdc++.h>
using namespace std;
int ABS(int _x) { return _x > 0 ? _x : -_x; }
string convert(int N) {
  string ret;
  while (N) {
    ret += N % 2 + '0';
    N /= 2;
  }
  int l = ret.size();
  for (int(i) = (0); (i) < (8 - l); (i)++) ret += '0';
  return ret;
}
int toInt(string s) {
  int ret = 0, t = 1;
  for (int(i) = (s.size() - 1); (i) >= (0); (i)--)
    ret += t * (s[i] - '0'), t *= 2;
  return ret;
}
int main() {
  char s[500];
  gets(s);
  int sz = strlen(s);
  int prev = 0, cur;
  for (int(i) = (0); (i) < (sz); (i)++) {
    cur = toInt(convert(int(s[i])));
    int ret = (prev - cur + 256) % 256;
    cout << ret << endl;
    prev = cur;
  }
  return 0;
}
