#include <bits/stdc++.h>
using namespace std;
using LL = long long;
constexpr int N = 1e5 + 5;
int rev(int c) {
  bitset<8> bs(c);
  string x = bs.to_string();
  reverse(begin(x), end(x));
  bitset<8> bbs(x);
  return bbs.to_ulong();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string line;
  getline(cin, line);
  int prv = 0;
  for (char &c : line) {
    int now = rev(c);
    cout << (prv - now + 256) % 256 << "\n";
    prv = now;
  }
}
