#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
const int n = 8;
bitset<8> my;
int f(int a, int b) {
  int rez = 1;
  if (b == 0) return 1;
  while (b--) {
    rez = ((rez * a) % 1000003);
  }
  return rez;
}
void f2(int a) {
  int k = 7;
  unsigned i, j = 1 << 8 - 1;
  for (i = 0; i < 8; ++i) {
    my[i] = ((a & j) == 0 ? 0 : 1);
    j >>= 1;
  }
}
int main() {
  string s;
  getline(cin, s);
  int otn = 0;
  int h = 0;
  for (int i = 0; i < s.length(); i++) {
    f2(s[i]);
    int f = my.to_ulong();
    ans.push_back((otn - my.to_ulong()) % 256);
    otn = my.to_ulong();
    h++;
    my.reset();
  }
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << endl;
  }
  return 0;
}
