#include <bits/stdc++.h>
using namespace std;
int reverse(int x) {
  int y = 0, z;
  for (int i = 0; i < 8; ++i) {
    z = 1;
    z &= x;
    x >>= 1;
    y += z << (7 - i);
  }
  return y;
}
int main() {
  string k;
  int x = 0, n, y;
  getline(cin, k);
  n = k.length();
  for (int i = 0; i < n; ++i) {
    y = reverse(k[i]);
    y = x - y;
    y = ((y % 256) + 256) % 256;
    x = reverse(k[i]);
    cout << y << endl;
  }
  return 0;
}
