#include <bits/stdc++.h>
int reverse(int c) {
  int rev = 0;
  for (int i = 0; i < 7; ++i) {
    rev |= (c >> i) & 1;
    rev <<= 1;
  }
  return rev;
}
int main() {
  std::string text;
  std::getline(std::cin, text);
  int prev = 0;
  for (int i = 0; i < text.size(); ++i) {
    int c = reverse(text[i]);
    if (prev - c < 0)
      std::cout << prev - c + 256 << std::endl;
    else
      std::cout << prev - c << std::endl;
    prev = c;
  }
  return 0;
}
