#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const double PI = acos(-1.0);
template <class T>
inline T sq(T x) {
  return x * x;
}
template <class T>
inline void upd_min(T &lhs, T rhs) {
  if (lhs > rhs) lhs = rhs;
}
template <class T>
inline void upd_max(T &lhs, T rhs) {
  if (lhs < rhs) lhs = rhs;
}
int reverse(int n) {
  n = (n & 0xf0) >> 4 | (n & 0x0f) << 4;
  n = (n & 0xcc) >> 2 | (n & 0x33) << 2;
  n = (n & 0xaa) >> 1 | (n & 0x55) << 1;
  return n;
}
void solve() {
  string data;
  getline(cin, data);
  int res = 0;
  for (int i = (0); i < (data.length()); ++i) {
    int _res = reverse(data[i]);
    res = (((res - _res) % (256) + (256)) % (256));
    cout << res << endl;
    res = _res;
  }
}
int main() {
  solve();
  return 0;
}
