#include <bits/stdc++.h>
using namespace std;
char str[105];
int b[105];
int fun(int n) {
  int j, k, sum = 0;
  for (k = 128, j = 7; j >= 0; j--) {
    sum += (n % 2) * k;
    k /= 2;
    n /= 2;
  }
  return sum;
}
int main() {
  int i, j, k, l;
  while (cin.getline(str, 105)) {
    l = strlen(str);
    printf("%d\n", (0 - (b[0] = fun(toascii(str[0]))) + 256) % 256);
    for (i = 1; i < l; i++)
      printf("%d\n", (b[i - 1] - (b[i] = fun(toascii(str[i]))) + 256) % 256);
  }
}
