#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10, inf = 1e10;
int bit[8];
int rev(int x) {
  memset(bit, 0, sizeof(bit));
  for (int(i) = 0; (i) < (8); (i)++) {
    bit[7 - i] = x & 1;
    x >>= 1;
  }
  x = 0;
  for (int(i) = 0; (i) < (8); (i)++) x += bit[i] * (1 << i);
  return x;
}
string s;
int main() {
  getline(cin, s);
  int r, prev = 0, next;
  for (int(i) = 0; (i) < ((int((s).size()))); (i)++) {
    r = rev(int(s[i]));
    next = (prev - r + 256) % 256;
    printf("%d\n", next);
    prev = r;
  }
  return 0;
}
