#include <bits/stdc++.h>
const double pi = 3.1415926535897932384626433832795;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
using namespace std;
void ifd() {}
void tme() {}
int reverse_d(char c) {
  int n = c, res = 0, d = 1 << 7;
  for (int i = (0); i < (8); ++i) {
    res += ((n >> i) & 1) * d;
    d /= 2;
  }
  return res;
}
int main() {
  ifd();
  int res1, res2;
  string s;
  vector<int> ans;
  getline(cin, s);
  ans.clear();
  for (int i = (0); i < (s.size()); ++i) {
    res2 = reverse_d(s[i]);
    if (i == 0)
      res1 = 0;
    else
      res1 = reverse_d(s[i - 1]);
    ans.push_back((res1 - res2) % 256);
  }
  for (int i = (0); i < (ans.size()); ++i)
    if (ans[i] >= 0)
      cout << ans[i] << endl;
    else
      cout << 256 + ans[i] << endl;
  tme();
  return 0;
}
