#include <bits/stdc++.h>
using namespace std;
char str[105];
int rec[128][9] = {0};
void pre() {
  for (int i = 1; i < 128; ++i) {
    int temp = i, cnt = 0;
    while (temp) rec[i][cnt++] = temp % 2, temp /= 2;
  }
}
int main() {
  pre();
  while (gets(str)) {
    int i = 0;
    int k = 0, last = 0, f = 1, t;
    while (str[i]) {
      k = 0;
      for (int j = 0; j < 8; ++j) k = k * 2 + rec[str[i]][j];
      t = k;
      k = last - k;
      last = t;
      k %= 256;
      while (k < 0) k += 256;
      printf("%d\n", k);
      ++i;
    }
  }
  return 0;
}
