#include <bits/stdc++.h>
using namespace std;
int binRev(int n) {
  vector<int> v;
  for (int i = 0; i < 8; i++) {
    v.push_back(n % 2);
    n = n / 2;
  }
  long long ret = 0;
  for (int i = 0; i < 8; i++) {
    ret *= 2;
    ret += v[i];
  }
  return ret;
}
int main() {
  string s;
  getline(std::cin, s);
  int n = (int)s.size();
  int lst = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '\n') break;
    int cnt1 = binRev(s[i]);
    int cnt2 = binRev(lst);
    lst = s[i];
    int rt = (cnt2 - cnt1 + 256) % 256;
    cout << rt << "\n";
  }
}
