#include <bits/stdc++.h>
using namespace std;
int reverse8(int x) {
  int ret = 0;
  for (int i = 7; i >= 0; i--) {
    if (x & (1 << i)) ret |= 1 << (7 - i);
  }
  return ret;
}
int main() {
  string S;
  getline(cin, S);
  int prev = 0;
  for (int i = 0; i < S.size(); i++) {
    int prevR = reverse8(prev);
    int asc = reverse8(S[i]);
    int cur = ((prevR - asc) % 256 + 256) % 256;
    prev = S[i];
    cout << cur << endl;
  }
  return 0;
}
