#include <bits/stdc++.h>
int main() {
  char s[110];
  while (gets(s)) {
    int m = 0;
    for (int i = 0; i < strlen(s); i++) {
      int x = s[i] - 0;
      int a[100], l = 0;
      for (int j = 0; j < 8; j++) {
        a[l] = x % 2;
        l++;
        x /= 2;
      }
      int ll = 1, sum = 0;
      for (int i = l - 1; i >= 0; i--) {
        sum += (a[i]) * ll;
        ll *= 2;
      }
      printf("%d\n", (m - sum + 256) % 256);
      m = sum;
    }
  }
}
