#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int reverse(int p) {
  int v[8];
  memset(v, 0, sizeof(v));
  int cnt = 0;
  while (p) {
    v[cnt++] = p % 2;
    p /= 2;
  }
  int ans = 0;
  for (int i = 0; i < 8; i++) {
    ans = ans * 2 + v[i];
  }
  return ans;
}
int main() {
  int pre = 0;
  string s;
  getline(cin, s);
  for (int i = 0; i < s.length(); i++) {
    int p = s[i];
    p = reverse(p);
    int temp = (pre - p + 256) % 256;
    cout << temp << endl;
    pre = p;
  }
  return 0;
}
