#include <bits/stdc++.h>
using namespace std;
char data[200];
int ans[200];
int revBit(int x) {
  int ret = 0;
  for (int(i) = (0), _n = (7); (i) <= _n; (i)++) {
    ret = ((ret << 1) | (x & 1));
    x = x >> 1;
  }
  return ret;
}
int main() {
  gets(data);
  int len = strlen(data);
  for (int(i) = (len - 1), _n = (0); (i) >= _n; (i)--) {
    int prev = 0;
    if (i > 0) prev = revBit(data[i - 1]);
    int res = revBit(data[i]);
    ans[i] = (prev - res + 256) % 256;
  }
  for (int(i) = (0), _n = (len - 1); (i) <= _n; (i)++) cout << ans[i] << endl;
  for (int(i) = (0), _n = (1); (i) <= _n; (i)++) getchar();
  return 0;
}
