#include <bits/stdc++.h>
using namespace std;
char niz[110];
int pred[110];
int reverse(char symb) {
  int used[8], num = symb, sol = 0;
  memset(used, 0, sizeof(used));
  for (int i = 0; i <= 7; i++) {
    used[i] = (num >> i) & 1;
  }
  for (int i = 0; i <= 7; i++) {
    if (used[i]) sol += (1 << (7 - i));
  }
  return sol;
}
void init() {
  cin.getline(niz, 109);
  int n = strlen(niz);
  int s1, s2, s3;
  for (int i = 0; i <= n - 1; i++) {
    if (!i)
      s1 = 0;
    else {
      s1 = reverse(niz[i - 1]);
    }
    s2 = (s1 - reverse(niz[i])) % 256;
    if (s2 < 0) s2 += 256;
    s3 = s2;
    pred[i] = s3;
    cout << pred[i] << endl;
  }
}
int main() {
  init();
  return 0;
}
