#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int size(const T& c) {
  return c.size();
}
inline string i2s(int x) {
  ostringstream o;
  o << x;
  return o.str();
}
string dec2any(int x, int b) {
  if (x == 0) return "0";
  string ret = "";
  int s;
  while (x != 0) {
    s = (x % b);
    if (s < 0) s += abs(b);
    ret = i2s(s) + ret;
    x = (x - s) / b;
  }
  return ret;
}
inline int rev(int x) {
  string s = dec2any(x, 2);
  while (size(s) < 8) s = "0" + s;
  reverse(s.begin(), s.end());
  int ans = 0;
  for (int i = 0, _n = (8); i < _n; ++i) ans = ans * 2 + s[i] - '0';
  return ans;
}
int main() {
  char z[128];
  while (gets(z)) {
    for (int i = 0; z[i]; i++) {
      int last = 0;
      if (i) last = rev(z[i - 1]);
      last -= rev(z[i]);
      if (last < 0) last += 256;
      last %= 256;
      cout << last << endl;
    }
  }
  return 0;
}
