#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979;
const double PI2 = 6.28318530717958;
const double PId2 = 1.570796326794895;
template <typename T>
T sqr(T x) {
  return x * x;
}
template <typename T>
T gcd(T a, T b) {
  return (b ? gcd(b, a % b) : a);
}
inline long long pw(long long n, int p) {
  long long ans = 1;
  for (int i = 0; i < p; i++) ans *= n;
  return ans;
}
inline vector<int> ReadVI(int count) {
  vector<int> arrayname(count);
  for (int i = 0; i < count; i++) cin >> arrayname[i];
  return arrayname;
}
inline vector<long long> ReadVlong(int count) {
  vector<long long> arrayname(count);
  for (int i = 0; i < count; i++) cin >> arrayname[i];
  return arrayname;
}
const int MOD = 100000000;
const int MAXVALUE = 10000001;
char mirror(char n) {
  for (int i = 0; i < 4; i++) {
    if (((n & 1 << i) != 0) != ((n & 1 << 7 - i) != 0)) {
      n ^= 1 << i;
      n ^= 1 << 7 - i;
    }
  }
  return n;
}
int main() {
  string s;
  getline(cin, s);
  int prev = 0;
  for (int i = 0; i < s.size(); i++) {
    int c = mirror(s[i]);
    printf("%d\n", (256 + prev - c) % 256);
    prev = c;
  }
  return 0;
}
