#include <bits/stdc++.h>
using namespace std;
string tob(int a) {
  string ans = "";
  while (a != 0) {
    ans = char((a % 2) + '0') + ans;
    a /= 2;
  }
  while (ans.length() < 8) {
    ans = '0' + ans;
  }
  return ans;
}
int toi(string s) {
  int a = s[0] - '0';
  for (int i = 1; i < s.length(); i++) {
    a *= 2;
    a += s[i] - '0';
  }
  return a;
}
string rev(string s) {
  string st = "";
  for (int i = 0; i < s.length(); i++) {
    st = s[i] + st;
  }
  return st;
}
int ans[1000];
int main() {
  string s;
  getline(cin, s);
  int pr = 0;
  for (int i = 0; i < s.length(); i++) {
    if (i) {
      pr = toi(rev(tob(int(s[i - 1]))));
    } else {
      pr = 0;
    }
    int k = toi(rev(tob(int(s[i]))));
    k = pr - k;
    while (k < 0) {
      k += 256;
    }
    cout << k << endl;
  }
}
