#include <bits/stdc++.h>
using namespace std;
char s[105];
int reserve(int x) {
  int bin[8], i, ans = 0, base = 1;
  for (i = 0; i < 8; i++) {
    bin[i] = x & 1;
    x >>= 1;
  }
  for (i = 7; i >= 0; i--, base <<= 1) {
    ans = base * bin[i] + ans;
  }
  return ans;
}
int main() {
  int pv, v;
  int n, i;
  pv = 0;
  gets(s);
  n = strlen(s);
  for (i = 0; i < n; i++) {
    v = reserve(s[i]);
    printf("%d\n", (pv - v + 256) % 256);
    pv = v;
  }
  return 0;
}
