#include <bits/stdc++.h>
using namespace std;
string s;
int Reverse(int n) {
  int ret = 0;
  for (int i = 0; i < 8; i++)
    if (n & (1 << i)) ret |= (1 << (7 - i));
  return ret;
}
int main() {
  getline(cin, s);
  int n = s.size();
  unsigned char pre = 0;
  for (int i = 0; i < n; i++) {
    unsigned char cur = s[i];
    cur = Reverse(cur);
    if (i == 0)
      pre = 0;
    else
      pre = Reverse(s[i - 1]);
    cur = (pre - cur) % 256;
    cout << (int)cur << endl;
  }
  return 0;
}
