#include <bits/stdc++.h>
using namespace std;
int rev(int a) {
  int ans = 0;
  int shift = 0;
  while (shift <= 7) {
    ans |= (a & 1 << shift ? 1 : 0) << (7 - shift);
    shift++;
  }
  return ans;
}
int main() {
  string a;
  int prev = 0;
  getline(cin, a);
  for (int i = 0; i < a.length(); i++) {
    int val = rev(a[i]);
    int res = prev - val;
    if (res > 0)
      cout << ((res) % 256) << endl;
    else
      cout << (256 + res) % 256 << endl;
    prev = val;
  }
  return 0;
}
