#include <bits/stdc++.h>
using namespace std;
void up_min(int &x, int y) {
  if ((x > y) || (x == -1)) x = y;
}
int get_num(int x) {
  char c[20];
  int i, j, t = 0;
  while (x) {
    c[t++] = x % 2 + '0';
    x /= 2;
  }
  for (i = t; i < 8; ++i) c[i] = '0';
  c[i] = 0;
  int ret = 0;
  for (i = 0, j = 7; i < 8; ++i, --j) ret += (1 << j) * (c[i] - '0');
  return ret;
}
int main() {
  char ch[110];
  while (cin.getline(ch, 105)) {
    int t = get_num(ch[0]);
    printf("%d\n", (0 - t + 256) % 256);
    for (int i = 1; ch[i]; ++i) {
      t = get_num(ch[i]);
      printf("%d\n", (get_num(ch[i - 1]) - t + 256) % 256);
    }
  }
}
