#include <bits/stdc++.h>
using namespace std;
int lst = 0;
int reversee(int act) {
  int nw = 0;
  for (int j = 0; j < 8; ++j) {
    if ((1 << j) & act) {
      nw |= (1 << (8 - j - 1));
    }
  }
  return nw;
}
int main() {
  string s;
  std::getline(cin, s);
  for (auto x : s) {
    int nw = reversee(x);
    int nval = lst - nw;
    nval %= 256;
    if (nval < 0) {
      nval = 256 + nval;
    }
    cout << nval << '\n';
    lst = reversee(x);
  }
  return 0;
}
