#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  int bef = 0;
  for (int i = 0; i < str.length(); i++) {
    string bi = "";
    int num = str[i];
    while (num) {
      bi += num % 2 + '0';
      num /= 2;
    }
    for (int i = bi.length(); i < 8; i++) {
      bi += '0';
    }
    int res = 0;
    int t = 1;
    for (int i = bi.length() - 1; i >= 0; i--) {
      res += (bi[i] - '0') * t;
      t *= 2;
    }
    if (bef - res < 0)
      printf("%d\n", 256 - (res - bef));
    else
      printf("%d\n", (bef - res) % 256);
    bef = res;
  }
  return 0;
}
