#include <bits/stdc++.h>
using namespace std;
int n;
int reverse(int a) {
  int ret = 0;
  int pow = 0;
  for (int i = 0; i < 8; ++i) {
    ret *= 2;
    ret += a % 2;
    a /= 2;
    pow++;
  }
  return ret;
}
void task() {
  string s;
  getline(cin, s);
  char prev = 0;
  for (int i = 0; i < s.length(); i++) {
    int ans = reverse(prev) - reverse(s[i]);
    if (ans < 0) ans += 256;
    prev = s[i];
    cout << ans << endl;
  }
}
int main() {
  task();
  return 0;
}
