#include <bits/stdc++.h>
using namespace std;
int aux = 0;
int rev(int n) {
  int ret = 0;
  for (int i = 0; i < 8; ++i) {
    ret = ret * 2 + n % 2;
    n /= 2;
  }
  return ret;
}
int main() {
  char c1 = 0, c2;
  while (scanf("%c", &c2) == 1) {
    if (c2 == '\n') break;
    aux = rev((int)c1);
    aux -= rev((int)c2);
    if (aux < 0) aux += 256;
    c1 = c2;
    cout << aux << endl;
  }
  return 0;
}
