#include <bits/stdc++.h>
using namespace std;
const bool online_judge = true;
const long long inf = 1LL << 60;
long long toInt(string s) {
  long long res;
  stringstream ss;
  ss << s;
  ss >> res;
  return res;
}
string toString(long long n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
string tobinary_reverse(long long c) {
  string ans = "";
  for (long long _ = 0; _ < 8; _++) {
    ans.push_back((c % 2) + '0');
    c /= 2;
  }
  return ans;
}
long long todecimal(string s) {
  long long ans = 0;
  long long kake = 1;
  for (long long i = 7; i >= 0; i--) {
    ans += (s[i] - '0') * kake;
    kake *= 2;
  }
  return ans;
}
long long mymod(long long a, long long b) {
  long long c = a % b;
  while (c < 0) c += b;
  return c;
}
void run() {
  string s;
  getline(cin, s);
  long long prev = 0;
  for (long long i = 0; i < ((long long)((s).size())); i++) {
    long long c = s[i];
    string b = tobinary_reverse(c);
    long long d = todecimal(b);
    cout << mymod((prev - d), 256) << endl;
    prev = d;
  }
}
int main(int argc, char *argv[]) {
  run();
  return 0;
}
