#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const long long INF64 = (long long)1e18;
const long double EPS = 1e-9;
const long double PI = 3.14159265358979323846;
int main() {
  string s;
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < s.size(); i++) {
    int x = s[i];
    vector<int> a;
    for (int j = 0; j < 8; j++) {
      a.push_back(x & 1);
      x >>= 1;
    }
    x = 0;
    for (int j = 0; j < 8; j++) {
      x <<= 1;
      x += a[j];
    }
    int cur;
    cur = (prev - x) % 256;
    if (cur < 0) {
      cur += 256;
    }
    printf("%d\n", cur);
    a.clear();
    prev = x;
  }
  return 0;
}
