#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 28;
const double INF = 1e12, EPS = 1e-9;
int rev(int a) {
  int d[8] = {}, res = 0;
  for (int i = 0; i < 8; i++) d[i] = a >> i & 1;
  for (int i = 0; i < 8; i++) res *= 2, res += d[i];
  return res;
}
void run() {
  string in;
  getline(cin, in);
  int res[101] = {};
  for (int i = 0; i < in.size(); i++) {
    res[i] = (rev(i ? in[i - 1] : 0) - rev(in[i]) + 256) % 256;
    cout << res[i] << endl;
  }
}
int main() { run(); }
