#include <bits/stdc++.h>
using namespace std;
int main() {
  char no[101];
  int x, a[8], i, j, k, z, y = 0;
  gets(no);
  for (i = 0; no[i] != '\0'; i++) {
    x = no[i];
    for (j = 0; j < 8; x /= 2) {
      a[j++] = x % 2;
    }
    for (j = 7; j >= 0; j--)
      if (a[j] == 1) {
        z = 1;
        for (k = 0; k < 7 - j; k++) z *= 2;
        x += z;
      }
    cout << (y - x + 256) % 256 << "\n";
    y = fabs(x);
  }
  return 0;
}
