#include <bits/stdc++.h>
using namespace std;
int sum;
void decode(int val, int bit) {
  if (val) {
    decode(val / 2, bit + 1);
    sum += (val % 2) * pow(2.0, 8 - bit);
    return;
  }
  if (bit <= 8) {
    decode(0, bit + 1);
  }
  return;
}
int main() {
  string s;
  while (getline(cin, s)) {
    int last = 0;
    for (int i = 0; i < s.size(); i++) {
      sum = 0;
      decode(s[i], 1);
      cout << (int)(unsigned char)(last - sum) << endl;
      last = sum;
    }
  }
  return 0;
}
