#include <bits/stdc++.h>
using namespace std;
int rev(int n) {
  int r = 0;
  for (int i = 0; i < 8; i++) {
    r <<= 1;
    if ((n & (1 << i)) != 0) r++;
  }
  return r;
}
int mod(int number, int modulus) {
  int result = number % modulus;
  if (result < 0) result += modulus;
  return result;
}
void TheSolution(istream& in, ostream& out) {
  string s;
  getline(in, s);
  int pr = 0;
  for (int i = 0; i < s.length(); i++) {
    int k = mod(pr - rev(s[i]), 256);
    out << k << endl;
    pr = rev(s[i]);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  TheSolution(cin, cout);
  return 0;
}
