#include <bits/stdc++.h>
using namespace std;
const int INF = (1LL << 31) - 1;
string toBinary(int n) {
  string ret = "";
  while (n) {
    ret += n % 2 + '0';
    n /= 2;
  }
  while (ret.size() < 8) ret += '0';
  return ret;
}
int toInt(string s) {
  int ret = 0, bitNo = 0;
  for (int i = s.size() - 1; i >= 0; --i) {
    if (s[i] == '1') {
      ret |= (1 << bitNo);
    }
    ++bitNo;
  }
  return ret;
}
int main() {
  char S[105];
  gets(S);
  int nextStep = 0, prev = 0;
  for (int i = 0; S[i]; ++i) {
    int code = S[i];
    string current = toBinary(code);
    nextStep = toInt(current);
    int res;
    res = (prev - nextStep + 256) % 256;
    printf("%d\n", res);
    prev = nextStep;
  }
  return 0;
}
