#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
using std::min;
using std::string;
using std::vector;
int main() {
  char p[256];
  cin.getline(p, 256);
  int a[200];
  a[0] = 0;
  int t, temp;
  for (int i = 0; p[i]; i++) {
    t = p[i];
    temp = ((t >> 7) & 1) | ((t >> 6) & 1) << 1 | ((t >> 5) & 1) << 2 |
           ((t >> 4) & 1) << 3 | ((t >> 3) & 1) << 4 | ((t >> 2) & 1) << 5 |
           ((t >> 1) & 1) << 6 | (t & 1) << 7;
    a[i + 1] = temp;
    temp = (256 + a[i] - temp) % 256;
    cout << temp << endl;
  }
  return 0;
}
