#include <bits/stdc++.h>
using namespace std;
const int mod = 256;
int getNum(char tch) {
  int num = tch;
  char ch[10];
  int cnt = 0;
  while (cnt < 8) {
    ch[cnt++] = num % 2 + '0';
    num /= 2;
  }
  num = 0;
  for (int i = 0; i < 8; i++) {
    num = num * 2 + (ch[i] - '0');
  }
  return num;
}
int main() {
  char ch[1000];
  gets(ch);
  int len = strlen(ch);
  int pre = 0;
  for (int i = 0; i < len; i++) {
    int tmp = getNum(ch[i]);
    cout << (pre - tmp + 10 * 256) % mod << endl;
    pre = tmp;
  }
  return 0;
}
