#include <bits/stdc++.h>
char words[105];
int table[105];
int reverse(int n) {
  int x, sum, bit[10], i;
  for (i = 0; i < 8; i++) {
    bit[i] = n % 2;
    n /= 2;
  }
  for (sum = 0, x = 1, i = 7; i >= 0; i--) {
    sum += x * bit[i];
    x *= 2;
  }
  return sum;
}
int main() {
  int n, i, j, k;
  ;
  gets(words);
  printf("%d\n", (0 - reverse(words[0]) + 256) % 256);
  table[0] = (0 - reverse(words[0]) + 256) % 256;
  for (i = 1; words[i] != '\0'; i++) {
    table[i] = (reverse(words[i - 1]) - reverse(words[i]) + 256) % 256;
    printf("%d\n", table[i]);
  }
  scanf(" ");
  return 0;
}
