#include <bits/stdc++.h>
using namespace std;
int read() {
  int n;
  char c;
  bool neg;
  n = 0;
  neg = false;
  for (c = getchar(); !(c >= '0' && c <= '9') && c != '-'; c = getchar())
    ;
  if (c == '-') {
    neg = true;
    c = getchar();
  }
  while ((c >= '0' && c <= '9')) {
    n = n * 10 + c - '0';
    c = getchar();
  }
  return neg ? -n : n;
}
int rev(int n) {
  int i;
  int res;
  res = 0;
  for (i = (0); i < (8); i++) {
    res = (res << 1) + ((n & (1 << i)) >> i);
  }
  return res;
}
int mod(int n) { return (n + 256) % 256; }
int main() {
  int i, n, a, b;
  string str;
  getline(cin, str);
  n = (int)str.size();
  b = 0;
  for (i = (0); i < (n); i++) {
    a = mod(b - rev(str[i]));
    b = rev(str[i]);
    cout << a << endl;
  }
  return 0;
}
