#include <bits/stdc++.h>
using namespace std;
unsigned char reverse(unsigned char b) {
  b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
  b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
  b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
  return b;
}
int main() {
  string s;
  getline(cin, s);
  unsigned char u = 0;
  for (int i = 0; i < s.size(); i++) {
    u = reverse(u);
    unsigned char a = reverse(s[i]);
    int ans = u - a;
    if (u - a < 0) ans += 256;
    cout << ans << endl;
    u = s[i];
  }
  return 0;
}
