#include <bits/stdc++.h>
long long const MAX = 1e5 + 5;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  getline(cin, s);
  long long n = s.length();
  long long prev = 0;
  for (long long i = 0; i < n; i++) {
    long long x = (long long)s[i];
    long long d = 0;
    long long j = 0;
    while (j < 8) {
      long long r = x % 2;
      d = d * 2 + r;
      x /= 2;
      j++;
    }
    cout << (prev - d + 256) % 256 << '\n';
    prev = d;
  }
}
