#include <bits/stdc++.h>
using namespace std;
char s[111];
int rev(int x) {
  int res = 0;
  for (int i = 0; i < 8; ++i) {
    int bit = x >> i & 1;
    int j = 8 - i - 1;
    res |= bit << j;
  }
  return res;
}
int main() {
  gets(s);
  vector<int> res;
  for (int i = 0; s[i] != 0; ++i) {
    int prev = 0, cur = s[i];
    if (i > 0) prev = s[i - 1];
    int x = rev(prev) - rev(cur);
    x %= 256;
    if (x < 0) x += 256;
    cout << x << endl;
  }
  return 0;
}
