#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
long long qpow(long long a, long long b) {
  long long q = 1;
  while (b > 0) {
    if ((b & 1) != 0) {
      q = (q % 1000003 * a % 1000003) % 1000003;
      b--;
    } else {
      a = (a % 1000003 * a % 1000003) % 1000003;
      b = b >> 1;
    }
  }
  return q;
}
int my(int k) {
  int g = 0, t = 0;
  while (k) {
    if (k % 2 != 0) t += qpow(2, 7 - g);
    g++;
    k /= 2;
  }
  return t;
}
long long l, len, i, c, n;
char s[1001];
int main() {
  gets(s);
  len = strlen(s);
  l = 0;
  for (i = 0; i < len; i++) {
    c = s[i];
    n = my(c);
    if (l - n < 0)
      printf("%d\n", 256 + l - n);
    else
      printf("%d\n", l - n);
    l = n;
  }
  return 0;
}
