#include <bits/stdc++.h>
using namespace std;
char a[150];
int main() {
  cin.getline(a, 150, '\n');
  int n = strlen(a);
  int x = 0;
  int nx;
  int t;
  int i, j;
  int tp;
  for (i = 0; i < n; ++i) {
    nx = 0;
    for (t = 0; t < 8; ++t) nx += (((int)a[i] & (1 << t)) > 0) << (7 - t);
    tp = x - nx;
    if (tp >= 256) tp %= 256;
    while (tp < 0) tp += 256;
    cout << tp << endl;
    x = nx;
  }
  return 0;
}
