#include <bits/stdc++.h>
using namespace std;
long long x, y, z, i, j, n, m, k, s1, s2, s3, s4, s5, s6, mod, l, r, t, maxx,
    minn, sx, so, sum, ans, puk, par, chi, sz, choc1, choc2, len, depth;
double u, v, w, x1, x2, x3, x4, z1, z2, z3, h, huh;
string s;
string q;
string p;
string sq[145];
long long aa[2045][2045];
long long a[100045];
long long b[3045];
long long c[3045];
int main() {
  getline(cin, s);
  a[0] = 0;
  mod = 256;
  x = 1;
  for (i = 0; i <= 7; i++) {
    b[i] = x;
    x *= 2;
  }
  for (i = 0; i < s.size(); i++) {
    x = s[i];
    q = "";
    for (j = 0; j <= 7; j++) {
      if (x % 2 == 1)
        q += '1';
      else
        q += '0';
      x /= 2;
    }
    reverse(q.begin(), q.end());
    x = 0;
    for (j = 0; j <= 7; j++) {
      x += (q[j] - 48) * b[j];
    }
    a[i + 1] = x;
  }
  for (i = 1; i <= s.size(); i++) {
    printf("%lld\n", (a[i - 1] - a[i] + mod) % mod);
  }
}
