#include <bits/stdc++.h>
using namespace std;
long long k = 1000003;
long long exp(long long p, long long q) {
  if (q == 1) return (long long)p;
  if (q == 0) return 1;
  long long temp = (long long)(exp(p, q / 2) % k);
  if (q % 2 == 0) {
    return (long long)((temp) * (temp)) % k;
  } else {
    return (long long)((((temp) * (temp)) * p) % k);
  }
}
int main() {
  string str;
  getline(cin, str);
  int bin[str.size() + 1];
  bin[0] = 0;
  for (int i = 0; i < str.size(); i++) {
    int k = (int)str[i];
    int val = 0;
    long long bina = 0;
    while (k > 0) {
      bina += k % 2;
      k /= 2;
      bina *= (long long)10;
    }
    int count = 0;
    int u = log10(bina);
    if ((int)str[i] < 64) bina *= 10;
    while (bina > 0) {
      long long t = bina % 10;
      val += t * pow((double)2, count);
      bina /= 10;
      count++;
    }
    int prev = bin[i];
    int s = bin[i] - val;
    bin[i + 1] = val;
    while (s < 0) s += 256;
    cout << s << endl;
  }
  return 0;
}
