#include <bits/stdc++.h>
using namespace std;
int rev(int n) {
  int res = 0;
  for (int i = 0; i < 8; ++i) res += ((n >> i) & 1) << (8 - i - 1);
  return res;
}
int main() {
  string s;
  while (getline(cin, s)) {
    int prev = 0;
    for (int i = 0; i < s.length(); ++i) {
      int t = (prev - rev(s[i]) + 256) % 256;
      prev = rev(s[i]);
      cout << t << endl;
    }
  }
  return 0;
}
