#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void checkMin(T& a, T b) {
  if (a > b) a = b;
}
template <typename T>
inline void checkMax(T& a, T b) {
  if (a < b) a = b;
}
int main() {
  string s;
  getline(cin, s);
  unsigned char pre = 0;
  for (__typeof((s).begin()) it = (s).begin(); it != (s).end(); ++it) {
    unsigned char cur = 0;
    for (int i = 0; i < int(8); ++i) {
      cur = (cur << 1) | ((*it >> i) & 1);
    }
    cur = -cur;
    printf("%d\n", (cur - pre + 256) % 256);
    pre = cur;
  }
  return 0;
}
