#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  string s;
  getline(cin, s);
  int last = 0;
  for (long long i = 0, _ = s.size(); i < _; i++) {
    bitset<8> at(s[i]);
    string x = at.to_string();
    reverse(x.begin(), x.end());
    bitset<8> nat(x);
    int val = nat.to_ulong();
    val = last - val;
    if (val < 0) val += 256;
    val %= 256;
    cout << val << endl;
    last = nat.to_ulong();
  }
  return 0;
}
