#include <bits/stdc++.h>
using namespace std;
int getReverted(int num) {
  bool bin[8] = {0};
  for (int j = 0; num != 0; j++) {
    bin[j] = num % 2;
    num /= 2;
  }
  for (int j = 0; j < 8; j++) {
    num += (int)bin[j] * pow(2, 7 - j);
  }
  return num;
}
int strSize(char *str) {
  int i;
  for (i = 0; str[i] != '\0'; i++)
    ;
  return i;
}
int main() {
  char str[101];
  int last = 0, result, size, reverted;
  scanf(" %[^\n]s", str);
  size = strSize(str);
  for (int i = 0; str[i] != '\0'; i++) {
    reverted = getReverted(str[i]);
    result = (last - reverted) % 256;
    if (result < 0)
      while (result < 0) result += 256;
    cout << result;
    if (i != size - 1) cout << endl;
    last = getReverted(str[i]);
  }
  return 0;
}
