#include <bits/stdc++.h>
using namespace std;
long long modulo(int a, int b, int c) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) x = (x * y) % c;
    y = (y * y) % c;
    b /= 2;
  }
  return x % c;
}
int sol(int n) {
  int k = 7;
  int so = 0;
  while (n > 0) {
    if (n % 2 == 1) {
      so = (so + pow(2, k));
    }
    k--;
    n /= 2;
  }
  return so;
}
int reverse(int x) {
  int y = 0, z = 128;
  for (; z; z = z >> 1) {
    y = y << 1;
    if (x & 1) y++;
    x = x >> 1;
  }
  return y;
}
int main() {
  string cad;
  getline(cin, cad);
  int ant = 0;
  int mos;
  for (int i = 0; i < cad.size(); i++) {
    int r = sol(cad[i]);
    cout << (256 - r + ant) % 256 << endl;
    ant = r;
  }
  return 0;
}
