#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  int r = 0;
  for (int i = 0; i < s.size(); i++) {
    int x = s[i];
    string s = bitset<8>(x).to_string();
    reverse(s.begin(), s.end());
    int n = bitset<8>(s).to_ulong();
    if (r - n >= 0)
      cout << (r - n) % 256 << endl;
    else
      cout << 256 - abs(r - n) % 256 << endl;
    r = n;
  }
}
