#include <bits/stdc++.h>
using namespace std;
int rev(int ch) {
  int ret = 0;
  string s = "";
  for (int i = 7; i > -1; --i) s += (ch & (1 << i)) ? '1' : '0';
  reverse(s.begin(), s.end());
  for (int i = 1; i < 9; ++i) ret |= (s[i - 1] == '1') ? (1 << (8 - i)) : 0;
  return ret;
}
int main() {
  int ans = 0;
  char ch = ' ', prv;
  for (int i = 0, ch = getchar(); ch != '\n'; ++i, ch = getchar()) {
    if (i == 0)
      ans = 0;
    else
      ans = rev(prv);
    ans = (ans - rev(ch)) % 256;
    if (ans < 0) ans += 256;
    prv = ch;
    cout << ans << endl;
  }
  return 0;
}
