#include <bits/stdc++.h>
using namespace std;
int main() {
  int k = 0;
  char c;
  while ((c = getchar()) != EOF) {
    if (c < 32) continue;
    int p = 0, t = c;
    for (int i = 0; i < 8; i++) {
      p = p * 2 + t % 2;
      t /= 2;
    }
    cout << (k - p + 256) % 256 << endl;
    k = p;
  }
  k = k;
}
