#include <bits/stdc++.h>
const long long INF = 1000000000;
using namespace std;
void prepare() {}
int rev(int n) {
  int res = 0;
  for (int i = (int)(8) - 1; i >= 0; i--)
    if (n & (1 << i)) {
      res += 1 << (7 - i);
    }
  return res;
}
int main() {
  prepare();
  int mod = 256;
  string s;
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < (int)(s.length()); i++) {
    int kod = rev((int)s[i]);
    printf("%d\n", (((prev - kod) % mod) + mod) % mod);
    prev = kod;
  }
  return 0;
}
