#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::list;
using std::map;
using std::string;
using std::vector;
int main() {
  string s;
  std::getline(cin, s);
  for (size_t i = 0; i < s.size(); i++) {
    int n = 0, m = 0, t;
    if (i != 0) {
      t = s[i - 1];
      for (size_t j = 0; j < 8; j++) {
        n = n * 2 + t % 2;
        t /= 2;
      }
    }
    t = s[i];
    for (size_t j = 0; j < 8; j++) {
      m = m * 2 + t % 2;
      t /= 2;
    }
    if (n < m) n += 256;
    cout << n - m << std::endl;
  }
  return 0;
}
