#include <bits/stdc++.h>
using namespace std;
const int inf = numeric_limits<int>::max() >> 2;
const double eps = 1e-9;
unsigned char rev(unsigned char c) {
  unsigned char res = 0;
  for (int i = 0; i < 8; ++i) {
    res |= ((c >> i) & 1) << (7 - i);
  }
  return res;
}
int main() {
  unsigned char p1 = 0, p2 = 0;
  string t;
  getline(cin, t, '\n');
  for (typeof((t).begin()) c = (t).begin(); c != (t).end(); c++) {
    unsigned char cc = *c;
    p1 = (256 + rev(p2) - rev(cc)) % 256;
    cout << (int)p1 << endl;
    p2 = cc;
  }
  return 0;
}
