#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int i, j, k, l, m, n;
  getline(cin, str);
  l = str.length();
  int last = 0;
  for (i = 0; i < l; i++) {
    int asci = (int)str[i];
    int t = 0, inc = 0, p = 128, sum = 0;
    for (j = 0; j < 8; j++) {
      if (asci != 0) {
        if ((asci / p) > 0) sum += pow(2, t), asci %= p;
      }
      t++;
      p /= 2;
    }
    cout << ((last - sum + 256) % 256) << endl;
    last = sum;
  }
}
