#include <bits/stdc++.h>
using namespace std;
const int MOD = 256;
char str[101];
int main() {
  gets(str);
  int N = strlen(str);
  int res = 0;
  for (int i = 0; i < N; ++i) {
    int bit = 0;
    for (int j = 7; j >= 0; --j)
      if (str[i] & (1 << (7 - j))) bit |= (1 << j);
    int out = (res - bit) % MOD;
    if (out < 0) out += MOD;
    printf("%d\n", out);
    res = bit;
  }
}
