#include <bits/stdc++.h>
using namespace std;
string text;
map<int, int> cache;
string to_bin(int v) {
  string res = "";
  for (int i = 128; i >= 1; i /= 2) {
    if (v - i >= 0) {
      res += '1';
      v -= i;
    } else {
      res += '0';
    }
  }
  return move(res);
}
int reverse_bin(int v) {
  if (cache.count(v)) {
    return cache[v];
  }
  int res = 0;
  string bin = to_bin(v);
  for (int i = 0, k = 1; i < 8; ++i, k *= 2) {
    if (bin[i] == '1') {
      res += k;
    }
  }
  cache[res] = v;
  cache[v] = res;
  return res;
}
int intercal(int prev, int ch) {
  int rprev = reverse_bin(prev);
  int rch = reverse_bin(ch);
  return (256 - rch + rprev) % 256;
}
int main() {
  getline(cin, text);
  cout << intercal(0, (int)text[0]) << endl;
  for (int i = 1; i < text.size(); ++i) {
    cout << intercal((int)text[i - 1], (int)text[i]) << endl;
  }
  return 0;
}
