#include <bits/stdc++.h>
using namespace std;
int cmp;
int digit(char a) {
  int k = a;
  int dg[30];
  int p = 0;
  int res = 0;
  for (int i = 1; k; i++, k /= 2) dg[i] = k % 2, p = i;
  k = 128;
  for (int i = 1; i <= p; i++, k /= 2) res += k * dg[i];
  return res;
}
int main() {
  char a;
  char ar[150];
  int p = 0;
  int tmp;
  for (int i = 1;; i++) {
    scanf("%c", &a);
    if (a > 126 || a < 32) break;
    ar[i] = a;
    p = i;
  }
  for (int i = 1; i <= p; i++) {
    tmp = digit(ar[i]);
    cmp -= tmp;
    if (cmp % 256 < 0)
      printf("%d\n", cmp % 256 + 256);
    else
      printf("%d\n", cmp % 256);
    cmp = tmp;
  }
  return 0;
}
