#include <bits/stdc++.h>
int ReverseBits(int input, int length) {
  int output = 0;
  while (length-- > 0) {
    output = (output << 1) | (input & 0x01);
    input >>= 1;
  }
  return output;
}
int main() {
  int i, j, k, l, n, m;
  char str[101];
  int po = 0;
  gets(str);
  m = strlen(str);
  int pr = 0;
  for (i = 0; i < m; i++) {
    n = (int)str[i];
    int result;
    if (i == 0) {
      result = ReverseBits(n, 8);
      result = pr - result;
      if (result <= 0) result = 256 + result;
      pr = result;
    } else {
      pr = ReverseBits(str[i - 1], 8);
      n = ReverseBits(n, 8);
      result = pr - n;
      result = 256 + result;
      result %= 256;
      pr = result;
    }
    printf("%d\n", pr);
  }
  return 0;
}
