#include <bits/stdc++.h>
using namespace std;
long long modF(long long n) {
  long long mod = 256;
  return (n % mod + mod) % mod;
}
long long FUNCREV(long long n) {
  vector<long long> dp(8, 0);
  long long dpC = 0;
  while (n > 1) {
    dp[dpC++] = n % 2;
    n = n / 2;
  }
  if (n != 0) dp[dpC++] = n;
  long long ans = 0, mul = 1;
  for (long long i = 7; i >= 0; i--) {
    ans = ans + dp[i] * mul;
    mul = mul << 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  getline(cin, s);
  for (long long i = 0; i < s.length(); i++) {
    long long number = s[i];
    long long rev;
    if (i == 0) {
      rev = 0;
    } else {
      rev = FUNCREV(s[i - 1]);
    }
    number = FUNCREV(number);
    number = (rev - number);
    number = modF(number);
    cout << number << endl;
  }
}
