#include <bits/stdc++.h>
const double PI = 2 * asin(1);
using namespace std;
char wew[1005];
long cur, sbm, temp;
int main() {
  gets(wew);
  int le = strlen(wew);
  sbm = 0;
  for (int i = 0; i < le; ++i) {
    temp = (int)wew[i];
    string wow = bitset<8>(wew[i]).to_string();
    reverse(wow.begin(), wow.end());
    int cur = bitset<8>(wow).to_ulong();
    cout << (sbm - cur + 256) % 256 << endl;
    sbm = cur;
  }
}
