#include <bits/stdc++.h>
using namespace std;
int rev(int c) {
  c = (c & 0x0F) << 4 | (c & 0xF0) >> 4;
  c = (c & 0x33) << 2 | (c & 0xCC) >> 2;
  c = (c & 0x55) << 1 | (c & 0xAA) >> 1;
  return c;
}
int mod(int a, int b) {
  a -= b;
  if (a < 0) return 256 + a;
  return a;
}
string s;
int cur, x;
int main() {
  getline(cin, s);
  cur = 0;
  for (int i = 0; i < s.size(); i++) {
    x = rev(s[i]);
    printf("%d\n", mod(cur, x));
    cur = x;
  }
  return 0;
}
