#include <bits/stdc++.h>
int reverse(int);
int main(void) {
  char str[110];
  str[0] = '\0';
  fgets(str, 110, stdin);
  int previous = 0;
  int i;
  for (i = 0; str[i + 1] != '\0'; i++) {
    int current = reverse(str[i]);
    int result = ((previous - current) % 256);
    if (result < 0) {
      result += 256;
    }
    printf("%i\n", result);
    previous = current;
  }
  return 0;
}
int reverse(int num) {
  int result = 0;
  char bites[8];
  int i;
  for (i = 7; i != -1; i--) {
    bites[i] = num % 2;
    num /= 2;
  }
  for (i = 0; i != 8; i++) {
    if (bites[i] == 1) {
      result += pow(2, i);
    }
  }
  return result;
}
