#include <bits/stdc++.h>
using namespace std;
int main() {
  char k[10000];
  int kr[10000], kn[10000];
  int u, f, m;
  cin.getline(k, 256);
  for (int a = 0; a < strlen(k); a++) {
    f = 128;
    kr[a] = 0;
    kn[a] = int(k[a]);
    for (int b = 1; b <= 8; b++) {
      kr[a] += (kn[a] / f) * (128 / f);
      kn[a] = kn[a] % f;
      f = f / 2;
    }
  }
  m = (0 - kr[0]) % 256;
  if (m < 0) m = 256 - (-1 * m);
  cout << m << endl;
  for (int a = 1; a < strlen(k); a++) {
    m = (kr[a - 1] - kr[a]) % 256;
    if (m < 0) m = 256 - (-1 * m);
    cout << m << endl;
  }
}
