#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned char c;
  unsigned char cprev = 0;
  while (c = getchar()) {
    if (c < 32 || c > 126) break;
    unsigned char result = 0;
    unsigned char work = c;
    for (int i = 0; i < 8; i++) {
      int bit = work & (1 << i);
      result = result << 1;
      if (bit) result++;
    }
    unsigned char resultc = 0;
    work = cprev;
    for (int i = 0; i < 8; i++) {
      int bit = work & (1 << i);
      resultc = resultc << 1;
      if (bit) resultc++;
    }
    int cp = resultc, cw = result;
    cout << (cp - cw + 256) % 256 << endl;
    cprev = c;
  }
}
