#include <bits/stdc++.h>
using namespace std;
static const int INF = 500000000;
template <class T>
void debug(T a, T b) {
  for (; a != b; ++a) cerr << *a << ' ';
  cerr << endl;
}
char s[200];
int main() {
  gets(s);
  int len = strlen(s), back = 0;
  for (int i = 0; i < len; ++i) {
    int rev = 0;
    for (int j = 0; j < 8; ++j)
      if (s[i] >> j & 1) rev |= (1 << (7 - j));
    printf("%d\n", (back - rev + 256) % 256);
    back = rev;
  }
  return 0;
}
