#include <bits/stdc++.h>
int pan(int nn) {
  int sum = 0, i;
  for (i = 1; i <= 8; i++) {
    sum = sum * 2;
    sum = sum + nn % 2;
    nn = nn / 2;
  }
  return sum;
}
int main() {
  char s[110];
  int n, i, sum = 0, pp;
  gets(s);
  n = strlen(s);
  for (i = 0; i < n; i++) {
    pp = pan(s[i]);
    printf("%d\n", (sum - pp + 256) % 256);
    sum = pp;
  }
}
