#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  int n = int((s).size());
  for (int i = 0; i <= n - 1; i++) {
    int x = 0;
    if (i) {
      for (int j = 1; j <= 8; j++) x += ((s[i - 1] >> (j - 1)) & 1) << (8 - j);
    }
    int z = 0;
    for (int j = 1; j <= 8; j++) z += ((s[i] >> (j - 1)) & 1) << (8 - j);
    int y = 0;
    if (x >= z)
      y = x - z;
    else
      y = (x - z + 256) % 256;
    cout << y << endl;
  }
  return 0;
}
