#include <bits/stdc++.h>
using namespace std;
int BinaryToDecimal(string n) {
  int val = 0;
  for (int i = 0; i < n.length(); i++) {
    if (n[i] == '1') val += pow(2, i);
  }
  return val;
}
int main() {
  ios::sync_with_stdio(false);
  string s;
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < s.length(); i++) {
    int curr = BinaryToDecimal(bitset<8>(s[i]).to_string());
    cout << (256 + (prev - curr)) % 256 << endl;
    prev = curr;
  }
  return 0;
}
