#include <bits/stdc++.h>
using namespace std;
int rev(int x) {
  int a[100];
  int top = -1, sum = 0;
  while (x) a[++top] = x % 2, x /= 2;
  while (top < 7) a[++top] = 0;
  for (int i = top; i >= 0; i--) sum += (a[i] * pow(2, top - i));
  return sum;
}
int main() {
  string s;
  getline(cin, s);
  int a = 0;
  for (int i = 0; i < s.length(); i++)
    cout << (256 - rev(s[i]) % 256 + rev(a) % 256) % 256 << endl, a = s[i];
  ;
}
