#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T abs(T a) {
  return ((a < 0) ? -a : a);
}
template <typename T>
inline T sqr(T a) {
  return a * a;
}
const int INF = (int)1E9 + 7;
const long double EPS = 1E-9;
const long double PI = 3.1415926535897932384626433832795;
char s[500];
int rev(int mask) {
  int ans = 0;
  for (int i = 0; i < int(8); ++i) ans |= (1 & (mask >> i)) << (8 - i - 1);
  return ans;
}
int main() {
  int n = strlen(gets(s));
  vector<int> ans;
  int prev = 0;
  for (int i = 0; i < int(n); ++i) {
    for (int cur = 0; cur < int(1 << 8); ++cur) {
      if (rev((rev(prev) - cur + 256) % 256) == int(s[i])) {
        ans.push_back(cur);
        break;
      }
    }
    prev = s[i];
  }
  for (int i = 0; i < int(int((ans).size())); ++i) printf("%d\n", ans[i]);
  return 0;
}
