#include <bits/stdc++.h>
using namespace std;
long long exponentiation(long long a, long long b, long long c) {
  long long ans = 1;
  for (int i = 1; i <= b; i++) {
    ans *= a;
    ans %= c;
  }
  return ans;
}
long long fac[1000001];
long long f8[1000001];
long long factorial(long long x) {
  fac[1] = 1;
  long long res = 1;
  for (int i = 2; i < x + 1; i++) {
    res = ((res % 1000000007) * (i % 1000000007)) % 1000000007;
    fac[i] = res;
  }
  return res;
}
string to8(int x) {
  string s = "";
  for (int i = 0; i < 8; i++) {
    if (x & (1 << i)) {
      s += "1";
    } else
      s += "0";
  }
  reverse(s.begin(), s.end());
  return s;
}
int toi8(string s) {
  int n = 0;
  for (int i = 0; i < 8; i++) {
    n += (s[i] - '0') * (1 << (7 - i));
  }
  return n;
}
int main() {
  string s;
  getline(cin, s);
  int n = s.length();
  int t[n];
  string ss;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      ss = to8(s[i]);
      reverse(ss.begin(), ss.end());
      int y = toi8(ss);
      int z = (-y) % 256;
      if (z < 0) z += 256;
      t[i] = z;
    } else {
      string sss = to8(s[i - 1]);
      reverse(sss.begin(), sss.end());
      int yy = toi8(ss);
      ss = to8(s[i]);
      reverse(ss.begin(), ss.end());
      int y = toi8(ss);
      int z = (yy - y) % 256;
      if (z < 0) z += 256;
      t[i] = z;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << t[i] << endl;
  }
  return 0;
}
