#include <bits/stdc++.h>
using namespace std;
int reverse(int a) {
  int b = 0;
  for (int i = 0; i < 8; i++) {
    b <<= 1;
    b |= a & 1;
    a >>= 1;
  }
  return b;
}
int main(int narg, char **arg) {
  int prev = 0;
  int c;
  while ((c = getchar()) >= 0) {
    if (c < 32) break;
    int a = c;
    a = reverse(a);
    a = (prev - a) & 0xff;
    prev = reverse(c);
    cout << a << endl;
  }
  return 0;
}
