#include <bits/stdc++.h>
using namespace std;
int main() {
  char input[200];
  while (gets(input)) {
    int i, j, l, result = 0;
    l = strlen(input);
    for (i = 0; i < l; i++) {
      int number = 0, count = 0, output[10] = {0};
      number = input[i] - (' ' - 32);
      while (number) {
        output[count++] = number % 2;
        number /= 2;
      }
      for (j = 0; j < 8; j++) number = number * 2 + output[j];
      printf("%d\n", (result - number + 256) % 256);
      result = number;
    }
  }
  return 0;
}
