#include <bits/stdc++.h>
using namespace std;
string s;
int a[1000], n;
int z(int x) {
  int res = 0;
  for (int i = 0; i < 8; i++)
    if (x & (1 << i)) res |= (1 << (7 - i));
  return res;
}
int main() {
  getline(cin, s);
  n = (int)s.length();
  for (int i = 0; i < n; i++) {
    cout << ((i == 0 ? 0 : z(s[i - 1])) + 1024 - z(s[i])) % 256 << endl;
  }
  return 0;
}
