#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
char s[100111];
int last = 0;
void print(int c) {
  int res = 0;
  for (int i = (1), _b = (8); i <= _b; i++) {
    res = res * 2 + c % 2;
    c /= 2;
  }
  printf("%d\n", (last - res + 256) % 256);
  last = res;
}
int main() {
  gets(s);
  for (int i = 0, _a = (strlen(s)); i < _a; i++) {
    print(s[i]);
  }
  return 0;
}
