#include <bits/stdc++.h>
using namespace std;
char s[101];
int rev;
int getr(int x) {
  stack<int> tmp;
  while (x > 0) {
    tmp.push(x % 2);
    x /= 2;
  }
  while (tmp.size() < 8) {
    tmp.push(0);
  }
  int j = 1, sum = 0;
  while (!tmp.empty()) {
    int a = tmp.top();
    tmp.pop();
    sum += (a * j);
    j = j * 2;
  }
  return sum;
  return 1;
}
int main() {
  gets(s);
  int l = strlen(s);
  rev = 0;
  for (int i = 0; i < l; i++) {
    int c = getr(s[i]);
    int a = rev - c;
    a %= 256;
    if (a < 0) a += 256;
    printf("%d \n", a);
    rev = c;
  }
  return 0;
}
