#include <bits/stdc++.h>
using namespace std;
char s[10001];
int a[50001];
const int mod = 1000003;
int main() {
  while (gets(s) != NULL) {
    int pre = 0;
    for (int i = 0; s[i]; i++) {
      int x = s[i];
      memset(a, 0, sizeof(a));
      int h = 0;
      while (x) {
        a[++h] = x % 2;
        x >>= 1;
      }
      int y = 0;
      for (int i = 1; i <= 8; i++) {
        y = y * 2 + a[i];
      }
      printf("%d\n", ((pre - y) % 256 + 256) % 256);
      pre = y;
    }
  }
}
