#include <bits/stdc++.h>
using namespace std;
int rev(int v) {
  int ans = 0;
  for (int i = 0; i < 8; i++) {
    if (v & (1 << i)) ans |= 1 << (7 - i);
  }
  return ans;
}
int main(void) {
  string s;
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < s.size(); i++) {
    for (int val = 0; val < 256; val++) {
      if (rev((unsigned char)s[i]) == (256 + prev - val) % 256) {
        cout << val << '\n';
        break;
      }
    }
    prev = rev((unsigned char)s[i]);
  }
}
