#include <bits/stdc++.h>
using namespace std;
int rev(int c) {
  int res = 0;
  for (int i = 0; i < (int)(8); ++i) {
    res <<= 1;
    if (c & 1) res |= 1;
    c /= 2;
  }
  return res;
}
int vs[1000];
int main(void) {
  string line;
  getline(cin, line);
  for (int i = 0; i < (int)(line.size()); ++i) {
    vs[i] = rev((int)line[i]);
  }
  int prev = 0;
  for (int i = 0; i < (int)(line.size()); ++i) {
    int res = (256 + prev - vs[i]) % 256;
    cout << res << endl;
    prev = vs[i];
  }
  return 0;
}
