#include <bits/stdc++.h>
using namespace std;
int mirror(int num) {
  int res = 0;
  for (int i = 0; i < 4; ++i) {
    res |= (num & (1 << i)) << (7 - i - i);
    res |= (num & (1 << (7 - i))) >> (7 - i - i);
  }
  return res;
}
int main() {
  int num;
  string s;
  vector<int> res;
  getline(cin, s);
  num = (0 + 256 - mirror((int)s[0])) % 256;
  res.push_back(num);
  for (int i = 1; i < s.size(); ++i) {
    num = (-mirror(s[i]) + 256 + mirror(s[i - 1])) % 256;
    res.push_back(num);
  }
  for (int i = 0; i < res.size(); ++i) {
    cout << res[i] << endl;
  }
  return 0;
}
