#include <bits/stdc++.h>
using namespace std;
int reverse(int x) {
  int r;
  for (int i = 0; i < 8; i++) {
    r = r * 2 + x % 2;
    x /= 2;
  }
  return r;
}
int main() {
  string s;
  getline(cin, s);
  int c = 0;
  for (int i = 0; i < int(s.size()); i++) {
    int x = (reverse(c) - reverse(int(s[i])) + 256 + 256) % 256;
    cout << x << endl;
    c = int(s[i]);
  }
}
