#include <bits/stdc++.h>
using namespace std;
int f(int x) {
  if (x == 0) return 0;
  int sum = 0;
  for (int i = 0; i < 7; i++) {
    if (x % 2 == 1) sum += pow(2, 7 - i);
    x /= 2;
  }
  return sum;
}
int main() {
  string s;
  getline(cin, s);
  int last = 0;
  for (int i = 0; i < s.length(); i++) {
    last = f(last);
    int k = f(int(s[i]));
    cout << (last - k + 256) % 256 << endl;
    last = s[i];
  }
  return 0;
}
