#include <bits/stdc++.h>
int main(void) {
  int len, i, j, k, l, store, match;
  char s[200];
  gets(s);
  len = strlen(s);
  for (i = 0; i < len; i++) {
    int a[8], b[8], remain = s[i], temp, value = 0;
    for (j = 7; j >= 0; j--) {
      if (remain % 2 == 0)
        a[j] = 0;
      else
        a[j] = 1;
      remain = remain / 2;
    }
    for (k = 0, j = 7; k < 8; k++, j--) b[j] = a[k];
    for (k = 0; k < 8; k++) {
      temp = 1;
      for (j = 0; j < k; j++) temp *= 2;
      value += b[7 - k] * temp;
    }
    if (i == 0) store = 0;
    match = store - value;
    if (match < 0) match += 256;
    store = value;
    printf("%d\n", match);
  }
  return 0;
}
