#include <bits/stdc++.h>
using namespace std;
unsigned int rev(unsigned int x) {
  x = (((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << 1));
  x = (((x & 0xcccccccc) >> 2) | ((x & 0x33333333) << 2));
  return x = (((x & 0xf0f0f0f0) >> 4) | ((x & 0x0f0f0f0f) << 4));
}
int mod(int a, int b) { return (a % b + b) % b; }
int main() {
  char ss[100];
  gets(ss);
  int len = strlen(ss);
  int res = 0;
  for (int i = 0; i < len; i++) {
    int get = rev((unsigned int)ss[i]);
    int now = res - get;
    res = get;
    printf("%d\n", mod(now, 256));
  }
  return 0;
}
