#include <bits/stdc++.h>
using namespace std;
int a[100005];
char s[100005];
int main() {
  gets(s);
  int n = strlen(s);
  for (int i = 0; i < n; i++) {
    int num = s[i], m = 128;
    for (int j = 0; j < 8; j++) {
      a[i] += (num % 2) * m;
      num /= 2;
      m /= 2;
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%d\n", (a[i - 1] - a[i] + 256) % 256);
  }
  return 0;
}
