#include <bits/stdc++.h>
using namespace std;
int rev(int a) {
  char s[20] = {};
  for (int i = 0, _n = (8); i < _n; i++) {
    s[i] = '0' + (a % 2);
    a /= 2;
  }
  int ret = 0, x = 1;
  for (int i = 8 - 1; i >= 0; i--) {
    ret += (s[i] - '0') * x;
    x *= 2;
  }
  return ret;
}
int main() {
  char str[200] = {};
  gets(str);
  for (int i = 0, _n = (strlen(str)); i < _n; i++) {
    int p = (i) ? rev(str[i - 1]) : 0;
    int now = 256 - rev(str[i]);
    printf("%d\n", (now + p) % 256);
  }
  return 0;
}
