#include <bits/stdc++.h>
using namespace std;
int main() {
  int d = 0;
  char s[120];
  char *p;
  gets(s);
  p = s;
  while (1) {
    char c = *p;
    if (!c) break;
    p++;
    int e = 0;
    for (int j = 0; j < 8; j++) {
      e = e << 1;
      e += (c & (1 << j)) >> j;
    }
    int n = d - e;
    if (n < 0) n = n + 256;
    printf("%d\n", n);
    d = e;
  }
  return 0;
}
