#include <bits/stdc++.h>
using namespace std;
uint8_t getRev(uint8_t x) {
  uint8_t newx = 0;
  int pow = 128;
  while (x) {
    newx += (x % 2) * pow;
    pow /= 2;
    x /= 2;
  }
  return newx;
}
int main() {
  string s;
  char nc, oc = (char)0;
  uint8_t x;
  cin >> std::noskipws;
  getline(std::cin, s);
  for (int i = 0; i < s.length(); i++) {
    nc = s[i];
    x = getRev((uint8_t)oc) - getRev((uint8_t)nc);
    cout << (int)x << endl;
    oc = nc;
  }
  return 0;
}
