#include <bits/stdc++.h>
using namespace std;
int rev[259];
int Reverse(int num) {
  int res = 0;
  for (int i = 7; i >= 0; i--) {
    res += pow(2, i) * (num % 2);
    num /= 2;
  }
  return res;
}
int main() {
  for (int i = 32; i <= 126; i++) {
    rev[i] = Reverse(i);
  }
  string s;
  getline(cin, s);
  int val = 0;
  for (int i = 0; i < s.size(); i++) {
    char ch = (int)s[i];
    val -= rev[ch];
    cout << ((val % 256) + 256) % 256 << "\n";
    val = rev[ch];
  }
  return 0;
}
