#include <bits/stdc++.h>
using namespace std;
int numbers[100 + 8], saved[100 + 8];
int binReverse(int x) {
  char tmp[100 + 8];
  memset(tmp, 0, sizeof tmp);
  int len = 0;
  while (x > 0) {
    if (x % 2 == 0)
      tmp[len++] = '0';
    else
      tmp[len++] = '1';
    x /= 2;
  }
  while (len < 8) tmp[len++] = '0';
  int result = 0, step = 1;
  for (int i = len - 1; i >= 0; i--) {
    result += step * ((int)tmp[i] - 48);
    step *= 2;
  }
  return result;
}
int main() {
  char line[100 + 8];
  gets(line);
  memset(saved, 0, sizeof saved);
  memset(numbers, 0, sizeof numbers);
  int len = strlen(line);
  for (int i = 0; i < len; i++) {
    saved[i + 1] = binReverse((int)line[i]);
    int tmp = (saved[i] - saved[i + 1]) % 256;
    if (tmp < 0) tmp += 256;
    printf("%d\n", tmp);
  }
  return 0;
}
