#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
unsigned rev(unsigned x) {
  unsigned res = 0;
  for (long long i = 0; i < 8; i++) {
    res *= 2;
    if (x % 2) res++;
    x /= 2;
  }
  return res;
}
int main() {
  char s[256];
  gets(s);
  vector<int> nums(strlen(s) + 1);
  nums[0] = 0;
  for (long long i = 1; i <= strlen(s); i++) {
    nums[i] = rev(s[i - 1]);
    if (i > 1)
      nums[i - 1] = rev(s[i - 2]);
    else
      nums[i - 1] = 0;
    nums[i] = (((nums[i - 1] - nums[i]) % 256) + 256) % 256;
    cout << nums[i] << endl;
  }
}
