#include <bits/stdc++.h>
using namespace std;
char ch[200];
int a[20];
int q;
int div(int n) {
  q = 0;
  while (n) {
    if (n % 2 == 0)
      a[++q] = 0;
    else
      a[++q] = 1;
    n /= 2;
  }
  for (int i = q + 1; i <= 8; i++) {
    a[i] = 0;
  }
  q = 8;
  for (int i = 1; i <= q; i++) {
  }
  int m = 0, b = 1;
  for (int i = q; i >= 1; i--) {
    m += b * a[i];
    b *= 2;
  }
  return m;
}
int main() {
  gets(ch);
  int now = 0;
  for (int i = 0; ch[i]; i++) {
    int k = ch[i];
    int h = div(k);
    int ans = (now - h + 256) % 256;
    cout << ans << endl;
    now = h;
  }
  return 0;
}
