#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int ans = 0;
  getline(cin, s);
  for (int i = 0; i < s.size(); i++) {
    int q = s[i], tol = 0, sum = 0;
    while (q != 0) {
      sum = sum + (q % 2) * (1 << (8 - tol - 1));
      tol++;
      q /= 2;
    }
    ans = ans - sum;
    ans += 256;
    ans %= 256;
    cout << ans << '\n';
    ans = sum % 256;
  }
}
