#include <bits/stdc++.h>
using namespace std;
int a[9];
char b[105];
int f(int n) {
  int num = 1;
  int i;
  for (i = 0; i < n; i++) {
    num *= 2;
  }
  return num;
}
int main() {
  while (gets(b)) {
    memset(a, 0, sizeof(a));
    int lenb = strlen(b);
    int i, j;
    int y = 0;
    int k;
    for (i = 0; i < lenb; i++) {
      int t = 0;
      int p = int(b[i]);
      for (j = 0; j < 8; j++) {
        int k = f(7 - j);
        if (k <= p) {
          a[j] = 1;
          p -= k;
          t += f(j);
        } else {
          a[j] == 0;
        }
      }
      k = y - t;
      if (k < 0) k = 256 + k;
      cout << k << endl;
      y = t;
    }
  }
  return 0;
}
