#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5 + 5;
const double EPS = 1e-9;
const long long INF = 1000000000000 + 5;
const int MAXN2 = 1e4 + 5;
char s[MAXN];
int a[MAXN];
int main() {
  gets(s + 1);
  s[0] = '!';
  int n = strlen(s);
  a[0] = 0;
  int c1, c2, c3;
  c3 = 0;
  for (int i = 1; i < n; i++) {
    c2 = 0;
    c1 = s[i];
    for (int j = 0; j < 8; j++) {
      if (c1 & (1 << j)) c2 |= (1 << (7 - j));
    }
    a[i] = (c3 - c2 + 256) % 256;
    c3 = c2;
  }
  for (int i = 1; i < n; i++) printf("%d\n", a[i]);
  return 0;
}
