#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
const int inf = 1010101010;
const double PI = 4 * atan(1);
string binary(int x, int le = 8) {
  string res = "";
  for (int i = 0; i < (le); i++) res += '0';
  for (int i = 0; i < (le); i++)
    if (x & (1 << i)) res[i] = '1';
  return res;
}
string rev(string const& s) {
  string t = "";
  for (int i = 0; i < (((int)(s).size())); i++)
    t += s[((int)(s).size()) - 1 - i];
  return t;
}
int val(string const& s) {
  int res = 0;
  for (int i = 0; i < (((int)(s).size())); i++) {
    res <<= 1;
    if (s[((int)(s).size()) - 1 - i] == '1') res |= 1;
  }
  return res;
}
int main() {
  string s;
  getline(cin, s);
  char prev = 0;
  for (typeof((s).begin()) it = (s).begin(); it != (s).end(); ++it) {
    char c = *it;
    for (int i = 0; i < (256); i++) {
      int step1 = val(rev(binary(prev)));
      int step2 = (step1 + 256 - i) % 256;
      int step3 = val(rev(binary(step2)));
      if (step3 == c) {
        cout << i << endl;
        break;
      }
    }
    prev = c;
  }
}
