#include <bits/stdc++.h>
int bitting(int n) {
  int k = 7, s = 0;
  ;
  while (n > 0) {
    if (n % 2) {
      s += pow(2, k);
    }
    k--;
    n /= 2;
  }
  return s;
}
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  getline(cin, s);
  int rev = bitting(s[0]);
  int out = (256 - rev) % 256;
  cout << out << "\n";
  for (int i = 1; i < s.length(); ++i) {
    int k = bitting(s[i]);
    out = (rev - k + 256) % 256;
    cout << out << "\n";
    rev = k;
  }
}
