#include <bits/stdc++.h>
using namespace std;
string s;
int rev(int n) {
  int res = 0;
  string t = "";
  while (n) {
    if (n & 1)
      t += "1";
    else
      t += "0";
    n >>= 1;
  }
  for (int i = t.size(); i < 8; i++) {
    t += "0";
  }
  reverse(t.begin(), t.end());
  for (int i = 0; i < (int)t.size(); i++) {
    if (t[i] == '1') res += pow(2, i);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < (int)s.length(); i++) {
    int curr = rev(s[i]);
    int ans = (256 + prev - curr) % 256;
    cout << ans << '\n';
    prev = curr;
  }
  return 0;
}
