#include <bits/stdc++.h>
using namespace std;
int toBinary(int num) {
  vector<int> vec;
  while (num > 0) {
    vec.push_back(num % 2);
    num = num / 2;
  }
  while (vec.size() < 8) {
    vec.push_back(0);
  }
  int temp = 0;
  for (int i = 0; i < vec.size(); i++) {
    temp += vec[7 - i] * pow(2, i);
  }
  return temp;
}
int main() {
  string s;
  getline(cin, s);
  int last = 0, x;
  for (int i = 0; i < s.size(); i++) {
    x = toBinary((int)s[i]);
    cout << ((last - x) % 256 + 256) % 256 << endl;
    last = x;
  }
}
