#include <bits/stdc++.h>
using namespace std;
char s[1000];
int i, len;
int res[100];
int bin(char c) {
  vector<int> z;
  int i;
  int n = (int)c;
  while (n > 0) {
    z.push_back(n % 2);
    n /= 2;
  }
  int lim = 8 - z.size();
  for (i = 0; i < lim; i++) z.push_back(0);
  int v = 0;
  for (i = 0; i < z.size(); i++) v = v * 2 + z[i];
  return v;
}
int main() {
  gets(s);
  len = strlen(s);
  int val = bin(s[0]);
  int val_prev;
  res[0] = 256 - val;
  for (i = 1; s[i] != 0; i++) {
    val = bin(s[i]);
    val_prev = bin(s[i - 1]);
    if (val_prev - val < 0) {
      res[i] = 256 + (val_prev - val);
      if (res[i] == 256) res[i] = 0;
    } else {
      res[i] = (val_prev - val);
      if (res[i] == 256) res[i] = 0;
    }
  }
  for (i = 0; i < len; i++) printf("%d\n", res[i]);
  return 0;
}
