#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[200];
  int num, i, j, k;
  int pre = 0;
  char temp[10];
  cin.getline(str, 200, '\n');
  for (i = 0; str[i] != 0; i++) {
    num = str[i];
    j = 0;
    while (num != 0) {
      k = num % 2;
      temp[j++] = k + '0';
      num = (num - k) / 2;
    }
    while (j < 8) temp[j++] = '0';
    temp[j] = '\0';
    for (j = 0; j < 8; j++) num += (temp[j] - '0') << (7 - j);
    k = (pre - num) % 256;
    if (k < 0) k += 256;
    cout << k << endl;
    pre = num;
  }
  return 0;
}
