#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:268435456")
using namespace std;
template <class T>
T abs(T &x) {
  return (x >= 0) ? (x) : (-x);
}
template <class T>
T sqr(T &x) {
  return (x) * (x);
}
template <class T>
T min(T &a, T &b) {
  return (a < b) ? (a) : (b);
}
template <class T>
T max(T &a, T &b) {
  return (a > b) ? (a) : (b);
}
int rev(int a) {
  int res = 0;
  for (int i = 0; i < 8; i++)
    if (a & (1 << i)) res |= 1 << (8 - i - 1);
  return res;
}
int main() {
  string s;
  getline(cin, s);
  s = char(0) + s;
  vector<int> v;
  int n = ((int)((s).size()));
  int x = s[n - 1];
  for (int i = n - 1; i >= 1; i--) {
    x = rev(x);
    int ans = (rev(int(s[i - 1])) - x + 256) % 256;
    v.push_back(ans);
    x = (x + ans) % 256;
    x = rev(x);
  }
  for (int i = ((int)((v).size())) - 1; i >= 0; i--) cout << v[i] << endl;
}
