#include <bits/stdc++.h>
using namespace std;
const long long LINF = ~(((long long)0x1) << 63) / 2;
const int INF = 0X3F3F3F3F;
const double eps = 1e-7;
const int MOD = 256;
int solve(int c) {
  vector<int> now;
  while (c) {
    if (c & 1)
      now.push_back(1);
    else
      now.push_back(0);
    c /= 2;
  }
  for (int i = now.size(); i < 8; i++) now.push_back(0);
  int ans = 0;
  for (int i = now.size() - 1; i >= 0; i--) {
    ans += now[i] * (1 << (now.size() - i - 1));
  }
  return ans;
}
int main() {
  int i, j, k, pre, now;
  string s;
  getline(cin, s);
  for (i = 0; i < s.size(); i++) {
    if (i == 0)
      pre = 0;
    else
      pre = s[i - 1];
    cout << ((solve(pre) - solve(s[i])) % MOD + MOD) % MOD << endl;
  }
  return 0;
}
