#include <bits/stdc++.h>
using namespace std;
string s;
int f(int x) {
  string s = "";
  for (int i = 0; i < 8; i++) {
    if (x & (1 << i))
      s += '1';
    else
      s += '0';
  }
  int ret(0);
  int cnt = 0;
  for (int i = (int)s.size() - 1; i >= 0; i--) {
    if (s[i] == '1') ret = ret | (1 << cnt);
    cnt++;
  }
  return ret;
}
int main() {
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < (int)s.size(); i++) {
    int rev = f(int(s[i]));
    int res = ((prev - rev) % 256);
    if (res < 0) res += 256;
    cout << res << endl;
    prev = rev;
  }
  return 0;
}
