#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[120];
  gets(s);
  int ss = 0;
  int i;
  int t = strlen(s);
  int j;
  for (i = 0; i < t; i++) {
    int c[8];
    for (j = 7; j >= 0; j--) {
      c[j] = s[i] % 2;
      s[i] = s[i] / 2;
    }
    int kk = 0;
    for (j = 7; j >= 0; j--) {
      kk = kk * 2 + c[j];
    }
    ss = ss - kk;
    ss = ss % 256;
    if (ss < 0) ss += 256;
    printf("%d\n", ss);
    ss = kk;
  }
}
