#include <bits/stdc++.h>
const int N = 100010;
const int inf = 0x3f3f3f3f;
using namespace std;
int main() {
  int pre = 0, now = 0;
  char c;
  while (c = getchar()) {
    now = 0;
    if (c < 32) break;
    for (int i = 0; i < 8; i++) now = now * 2 + c % 2, c /= 2;
    cout << (pre - now + 256) % 256 << endl;
    pre = now;
  }
  return 0;
}
