#include <bits/stdc++.h>
int mod(int a) {
  if (a >= 0) return a % 256;
  return 256 + a % 256;
}
int BitReverse(int a) {
  std::string s;
  while (a) {
    s += char(a % 2 + '0');
    a /= 2;
  }
  int len = s.length(), res = 0;
  while (len < 8) {
    s += '0';
    len++;
  }
  for (int i = 1; i <= 8; i++)
    res += (int(s[i - 1] - '0') * int(pow(2.0, double(len - i))));
  return res;
}
int main() {
  std::string s;
  getline(std::cin, s);
  std::vector<int> v;
  v.push_back(mod(-BitReverse(s[0])));
  int len = s.length();
  for (int i = 1; i < len; i++)
    v.push_back(mod(BitReverse(s[i - 1]) - BitReverse(s[i])));
  int sz = v.size();
  for (int i = 0; i < sz; i++) std::cout << v[i] << '\n';
  return 0;
}
