#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = 1 << 30;
const int mod = 1000;
const int maxm = 1 + 5;
const int maxn = 300000000 + 5;
int fz(int x) {
  int b[40], c = 0;
  while (x) {
    b[c++] = x % 2;
    x /= 2;
  }
  int as = 0;
  for (int i = (0), _b(c); i < _b; ++i) {
    as *= 2;
    as += b[i];
  }
  for (int i = (0), _b(8 - c); i < _b; ++i) {
    as *= 2;
  }
  return as;
}
int main() {
  char s[10000];
  gets(s);
  int len = strlen(s);
  int ans = 0;
  for (int i = (0), _b(len); i < _b; ++i) {
    int p = fz(s[i]);
    ans = (ans - p + 256) % 256;
    cout << ans << endl;
    ans = p;
  }
  return 0;
}
