#include <bits/stdc++.h>
using namespace std;
string s;
int ret;
int Rev(int x) {
  int ret = 0;
  for (int i = 0; i < 8; ++i) ret += ((x >> (7 - i)) & 1) << i;
  return ret;
}
int main() {
  getline(cin, s);
  for (int i = 0; i < s.size(); ++i) {
    cout << (Rev(ret) - Rev(s[i]) + 256) % 256 << endl;
    ret = s[i];
  }
  return 0;
}
