#include <bits/stdc++.h>
using namespace std;
int reverse(int x) {
  int res = 0;
  for (int j = 0; j < 8; ++j) res |= ((!!((1 << j) & x)) << (8 - j - 1));
  return res;
}
int main() {
  string tmp;
  getline(cin, tmp);
  int last = 0;
  for (int j = 0; j < tmp.size(); ++j) {
    int x = tmp[j];
    int tt = last;
    last = reverse(tmp[j]);
    x = reverse(x);
    cout << (256 - x + tt + 256) % 256 << endl;
  }
}
