#include <bits/stdc++.h>
using namespace std;
string S;
vector<int> V;
int rev(int x) {
  long long sum = 0;
  for (int i = 0; i < 8; i++) {
    int temp = x % 2;
    sum = sum * 2 + temp;
    x /= 2;
  }
  return sum;
}
int main() {
  ios::sync_with_stdio(false);
  getline(cin, S);
  int prev = 0;
  for (int i = 0; i < (int)S.size(); i++) {
    int t = (int)S[i];
    t = rev(t);
    if (prev >= t)
      V.push_back(prev - t);
    else
      V.push_back(prev + 256 - t);
    prev = t;
  }
  for (int i = 0; i < (int)V.size(); i++) {
    cout << V[i] << endl;
  }
  return 0;
}
