#include <bits/stdc++.h>
using namespace std;
unsigned rev(unsigned v) {
  unsigned r = 0;
  for (int i = 0; i < (8); ++i) {
    r <<= 1;
    r |= (v >> i) & 1;
  }
  return r;
}
int main() {
  char T[128];
  int l;
  cin.getline(T, 128);
  l = strlen(T);
  vector<unsigned> R(l + 1);
  R[0] = (0 - rev(T[0])) % 256;
  for (int i = 1; i <= (l - 1); ++i) {
    R[i] = (rev(T[i - 1]) - rev(T[i])) % 256;
  }
  for (int i = 0; i < (l); ++i) {
    cout << R[i] << endl;
  }
  return 0;
}
