#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  getline(cin, a);
  int x = 0;
  for (int i = 0; i < a.length(); i++) {
    int n = int(a[i]);
    string s;
    s.clear();
    for (int j = 0; j < 8; j++, n /= 2) {
      if (n % 2)
        s += '1';
      else
        s += '0';
    }
    int p = 1;
    for (int j = 7; j >= 0; j--, p *= 2) n += int(s[j] - '0') * p;
    cout << (256 + x - n) % 256 << endl;
    x = n;
  }
}
