#include <bits/stdc++.h>
using namespace std;
int a[10];
void zh1(int x) {
  memset(a, 0, sizeof(a));
  for (int i = 1; i <= 8; i++) {
    if (x & 1) a[i] = 1;
    x >>= 1;
    if (x == 0) break;
  }
}
int zh2() {
  int tmp = 1, ans = 0;
  for (int i = 1; i <= 8; i++) {
    if (a[i]) ans += tmp;
    tmp *= 2;
  }
  return ans;
}
int main() {
  string s;
  getline(cin, s);
  int q = 0;
  for (int k = 0; k < s.size(); k++) {
    int tmp = s[k];
    zh1(tmp);
    reverse(a + 1, a + 9);
    int tmp2 = zh2();
    tmp2 = q - tmp2 + 256;
    tmp2 %= 256;
    q = zh2();
    cout << tmp2 << endl;
  }
  return 0;
}
