#include <bits/stdc++.h>
using namespace std;
unsigned char BitReverse(unsigned char c) {
  unsigned char rc = 0;
  unsigned char mask = 1;
  for (int i = 0; i < 8; i++) {
    bool b = (c & mask) != 0;
    rc = rc << 1;
    if (b) {
      rc += 1;
    }
    mask = mask << 1;
  }
  return rc;
}
unsigned char Subtract256(unsigned char a, unsigned char b) {
  unsigned char res;
  if (a >= b) {
    res = a - b;
  } else {
    res = (256 - b) + a;
  }
  return res;
}
int main(int argc, char* argv[]) {
  string data;
  getline(cin, data);
  unsigned char pb = 0;
  for (int i = 0; i < data.length(); i++) {
    unsigned char b = static_cast<unsigned char>(data[i]);
    unsigned char a = Subtract256(BitReverse(pb), BitReverse(b));
    cout << static_cast<int>(a) << endl;
    pb = b;
  }
  return 0;
}
