#include <bits/stdc++.h>
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int rev2[4] = {0, 2, 1, 3};
  int rev4[16], rev8[256];
  for (int i = 0; i < 16; i++) {
    rev4[i] = rev2[i >> 2] | (rev2[i & 3] << 2);
  }
  for (int i = 0; i < 256; i++) {
    rev8[i] = rev4[i >> 4] | (rev4[i & 15] << 4);
  }
  std::string s;
  std::getline(std::cin, s);
  int prev_rev = 0;
  for (uint8_t c : s) {
    int rc = rev8[c];
    int a = (prev_rev - rc + 256) % 256;
    std::cout << a << std::endl;
    prev_rev = rc;
  }
}
