#include <bits/stdc++.h>
using namespace std;
pair<int, int> change(int a, int last) {
  string tmp;
  int arg = a;
  while (arg > 0) {
    if (arg % 2 == 1)
      tmp += '1';
    else
      tmp += '0';
    arg /= 2;
  }
  while (tmp.length() < 8) tmp += '0';
  int counter = 1;
  int ret = 0;
  for (int i = tmp.length() - 1; i >= 0; i--) {
    if (tmp[i] == '1') ret += counter;
    counter *= 2;
  }
  a = ret;
  ret = last - ret;
  while (ret < 0) ret += 256;
  while (ret >= 256) ret -= 256;
  return make_pair(ret, a);
}
int main() {
  string s;
  getline(cin, s);
  int temp = 0;
  for (int i = 0; i < s.length(); i++) {
    cout << change(s[i], temp).first << endl;
    temp = change(s[i], temp).second;
  }
  return 0;
}
