#include <bits/stdc++.h>
using namespace std;
int rev(int n) {
  int ret = 0;
  for (int i = 0; i < 8; ++i) {
    ret = ret * 2 + n % 2;
    n /= 2;
  }
  return ret;
}
int main(void) {
  char a[1000];
  gets(a);
  int len = strlen(a);
  int res = 0;
  for (int i = 0; i < len; ++i) {
    int v = (int)a[i];
    int w = rev(v);
    int x = (res - w) % 256;
    x += 256;
    x %= 256;
    printf("%d\n", x);
    res = w;
  }
  return 0;
}
