#include <bits/stdc++.h>
using namespace std;
char c;
int mo = 1000003;
int main() {
  int pre = 0;
  while (scanf("%c", &c) != EOF) {
    if (c < 32 || c > 126) break;
    int w = c;
    int tmp = 0;
    for (int j = 0; j < 8; j++) {
      tmp = tmp * 2 + w % 2;
      w /= 2;
    }
    w = tmp;
    tmp = pre - tmp;
    pre = w;
    if (tmp < 0) tmp += 256;
    printf("%d\n", tmp);
  }
  return 0;
}
