#include <bits/stdc++.h>
using namespace std;
int rev(int i) {
  int ret = 0;
  for (int j = 0; j < (int)(8); j++)
    if (i & (1 << j)) ret |= (1 << (7 - j));
  return ret;
}
int main() {
  char s[105];
  cin.getline(s, 105, '\n');
  int l = strlen(s);
  int last = 0;
  for (int i = 0; i < (int)(l); i++) {
    int val = rev(s[i]);
    cout << (last - val + 256) % 256 << endl;
    last = val;
  }
  return 0;
}
