#include <bits/stdc++.h>
using namespace std;
char rev(char ch) {
  char ans = 0;
  for (int i = 0; i < 8; i++) {
    ans = ans * 2 + ch % 2;
    ch /= 2;
  }
  return ans;
}
int main() {
  char str[256];
  int ans[256];
  while (fgets(str + 1, 200, stdin)) {
    str[0] = 0;
    ans[0] = 0;
    for (int i = 1; i < strlen(str + 1); i++) {
      ans[i] = (rev(str[i - 1]) - rev(str[i])) % 256;
      if (ans[i] < 0) {
        ans[i] += 256;
      }
      cout << ans[i] << endl;
    }
  }
  return 0;
}
