#include <bits/stdc++.h>
using namespace std;
int main() {
  string str, ans;
  getline(cin, str);
  int i, x, count, temp, p, sum, n, j;
  x = 0;
  n = str.length();
  for (i = 0; i < n; i++) {
    int p = str[i];
    count = 1;
    ans = "";
    bitset<8> b(p);
    count = 1;
    sum = 0;
    for (j = 7; j >= 0; j--) {
      if (b[j] == 1) {
        sum = sum + count;
      }
      count = count * 2;
    }
    temp = sum;
    sum = (x - sum);
    cout << (sum + 256) % 256;
    cout << "\n";
    x = temp;
  }
  return 0;
}
