#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int A[200];
int rev(char a) {
  int b = 0;
  for (int i = 7; i >= 0; i--) {
    if (a & (1 << i)) b = b | (1 << (7 - i));
  }
  return b;
}
int main() {
  getline(cin, s);
  n = s.size();
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      A[i] = -rev(s[i]);
      A[i] %= 256;
      if (A[i] < 0) A[i] += 256;
    } else {
      A[i] = rev(s[i - 1]) - rev(s[i]);
      A[i] %= 256;
      if (A[i] < 0) A[i] += 256;
    }
  }
  for (int i = 0; i < n; i++) cout << A[i] << endl;
  return 0;
}
