#include <bits/stdc++.h>
using namespace std;
int reverse(int n) {
  int res = 0;
  for (int i = 7; i >= 0; i--) res += (bool)((n) & (1 << 7 - i)) << i;
  return res;
}
int main() {
  string ss;
  getline(cin, ss);
  vector<int> s(ss.length());
  for (int i = 0; i < s.size(); i++) s[i] = (int)ss[i];
  int prev = 0;
  for (int i = 0; i < s.size(); i++) {
    s[i] = reverse(s[i]);
    int tmp = ((prev - s[i]) % (1 << 8) + (1 << 8)) % (1 << 8);
    cout << tmp << endl;
    prev = s[i];
  }
}
