#include <bits/stdc++.h>
using namespace std;
string binary_convert(int n) {
  string st = "";
  while (n > 0) {
    if (n % 2 == 0) {
      st += "0";
    } else
      st += "1";
    n /= 2;
  }
  return st;
}
int main() {
  string str;
  while (getline(cin, str)) {
    int len = (int)str.size(), i, result = 0;
    string binary;
    for (i = 0; i < len; i++) {
      binary = "";
      char a = str[i];
      int num = a;
      binary = binary_convert(num);
      int ln = (int)binary.size(), p = 0, j;
      j = ln;
      while (j < 19) {
        binary += "0";
        j++;
      }
      if (num % 2) {
        binary[0] = '1';
      }
      num = 0;
      for (j = 7, p = 0; j > -1; j--, p++) {
        a = binary[j];
        num += pow(2, (double)p) * (a - '0');
        num = num;
      }
      num %= 256;
      result = (result - num + 256) % 256;
      cout << result << endl;
      result = fabs(num);
    }
  }
  return 0;
}
