#include <bits/stdc++.h>
using namespace std;
int main() {
  int pre = 0;
  char ch;
  while (scanf("%c", &ch) != EOF) {
    int x = ch, b[9];
    if (x < 32 || x > 126) break;
    for (int j = 1; j <= 8; ++j) {
      b[j] = x % 2;
      x /= 2;
    }
    x = 0;
    for (int j = 1; j <= 8; ++j) {
      x = x * 2 + b[j];
    }
    printf("%d\n", (pre - x + 256) % 256);
    pre = x;
  }
  return 0;
}
