#include <bits/stdc++.h>
using namespace std;
int reverse(int x) {
  x = ((x & 0x55) << 1) | ((x >> 1) & 0x55);
  x = ((x & 0x33) << 2) | ((x >> 2) & 0x33);
  x = ((x & 0x0f) << 4) | ((x >> 4) & 0x0f);
  return x;
}
int main() {
  string s;
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < s.size(); ++i) {
    int c = s[i];
    int r = reverse(c);
    for (int j = 0; j < 256; ++j) {
      if (((prev - j) & 0xff) == r) {
        cout << j << endl;
      }
    }
    prev = reverse(c);
  }
  return 0;
}
