#include <bits/stdc++.h>
char x, y;
int nr, val, val2, A[256], B[256];
int main() {
  int i, j;
  for (i = 0; i < 256; i++) {
    val = i;
    val2 = 0;
    for (j = 1; j <= 8; j++) {
      if (val % 2 == 1) val2 += 1 << (8 - j);
      val /= 2;
    }
    B[i] = val2;
  }
  while (scanf("%c", &x) != EOF) {
    if ((int)x >= 32 && (int)x <= 126) {
      nr++;
      if (nr == 1) {
        val = (int)x;
        val2 = 0;
        for (i = 1; i <= 8; i++) {
          if (val % 2 == 1) val2 += 1 << (8 - i);
          val /= 2;
        }
        val = val2;
        A[nr] = 256 - val;
        printf("%d\n", A[nr]);
        A[nr] = (int)x;
      } else {
        val = (int)x;
        val2 = 0;
        for (i = 1; i <= 8; i++) {
          if (val % 2 == 1) val2 += 1 << (8 - i);
          val /= 2;
        }
        val = val2;
        A[nr] = B[A[nr - 1]] - val;
        if (A[nr] < 0) A[nr] += 256;
        printf("%d\n", A[nr]);
        A[nr] = (int)x;
      }
      y = x;
    } else
      break;
  }
  return 0;
}
