#include <bits/stdc++.h>
using namespace std;
int run() { return 0; }
unsigned char re(unsigned char c) {
  int t[8];
  int cnt = 0;
  for (; cnt < 8; c /= 2, cnt++) {
    t[cnt] = (c % 2);
  }
  char ret = 0;
  for (int i = 0; i < 8; i++) {
    ret = ret * 2 + t[i];
  }
  return ret;
}
int main() {
  string p;
  char pp[1024];
  gets(pp);
  p = pp;
  unsigned char pre = 256 - re(p[0]);
  cout << (unsigned int)pre << endl;
  for (int i = 1; i < p.size(); i++) {
    pre = re(p[i - 1]) - re(p[i]);
    cout << (unsigned int)pre << endl;
  }
  return 0;
}
