#include <bits/stdc++.h>
using namespace std;
int rev(int a) {
  bitset<8> bs(a);
  string s = bs.to_string();
  reverse((s).begin(), (s).end());
  return bitset<32>(s).to_ulong();
}
int main() {
  string line;
  getline(cin, line);
  for (int i = 0; i < (int)(line.length()); i++) {
    int p = i == 0 ? 0 : line[i - 1];
    int c = line[i];
    int x = (rev(p) - rev(c) + 256) % 256;
    ;
    printf("%d\n", x);
  }
  return 0;
}
