#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:65000000")
using namespace std;
int reverce(int a) {
  int res = 0;
  for (int i = 0; i < 8; ++i) {
    res <<= 1;
    res |= (a & 1);
    a >>= 1;
  }
  return res & 255;
}
int main() {
  char buf[1000];
  cin.getline(buf, 1000, '\n');
  int prev = 0;
  for (int i = 0; buf[i] != 0; ++i) {
    printf("%d\n", (-reverce(buf[i]) + reverce(prev) + 256) & 255);
    prev = buf[i];
  }
  return 0;
}
