#include <bits/stdc++.h>
using namespace std;
string p;
char rev(char r) {
  char e = 0;
  bool b[8];
  for (int i = 0, j = 7; i < 8; ++i, --j)
    b[i] = (r & (1 << j)), e |= (b[i] << i);
  return e;
}
int main() {
  getline(cin, p);
  for (int i = 0; i < p.length(); ++i) {
    int s2 = rev(p[i]);
    int s1 = (i ? rev(p[i - 1]) : 0);
    cout << (s1 - s2 + 256) % 256 << endl;
  }
}
