#include <bits/stdc++.h>
using namespace std;
char ins[102];
int ans, l, last, now, MD = 256;
short _2[10];
void read() {
  gets(ins + 1);
  l = strlen(ins + 1);
}
void work() {
  for (int i = 1; i <= l; i++) {
    now = ins[i];
    for (int j = 1; j <= 8; j++) _2[j] = now & 1, now >>= 1;
    int p = 0, b = 1;
    now = 0;
    while (!_2[p] && p <= 8) p++;
    for (int j = 8; j >= p; j--) now += _2[j] * b, b <<= 1;
    ans = ((last - now) % MD + MD) % MD;
    printf("%d\n", ans);
    last = now;
  }
}
void put() {}
int main() {
  read();
  work();
  put();
  return 0;
}
