#include <bits/stdc++.h>
using namespace std;
int get(int h) {
  string s = "";
  while (h) {
    s += (h % 2 + '0');
    h /= 2;
  }
  while (s.size() < 8) {
    s += '0';
  }
  int c = 0;
  int j = 0;
  for (int i = s.size() - 1; i >= 0; --i) {
    c += ((s[i] - '0') * (1 << j));
    ++j;
  }
  return c;
}
int main() {
  string s;
  getline(cin, s);
  int c;
  for (int i = 0; i < (int)s.size(); ++i) {
    int h = get(s[i]);
    if (i == 0) {
      cout << (0 - h + 256) % 256 << endl;
    } else
      cout << (c - h + 256) % 256 << endl;
    c = h;
  }
  return 0;
}
