#include <bits/stdc++.h>
using namespace std;
int main() {
  int prev = 0, bit[8], i, num;
  char c;
  c = getchar();
  while (c != '\n' && c > 0) {
    for (i = 0; i < 8; ++i, c /= 2) bit[i] = c % 2;
    for (i = 0, num = 0; i < 8; ++i) num = num * 2 + bit[i];
    cout << (prev - num + 256) % 256 << endl;
    prev = num;
    c = getchar();
  }
  return 0;
}
