#include <bits/stdc++.h>
using namespace std;
const long long N = 1005;
int dx[] = {1, -1, 0, 0, 1, 1, -1, -1};
int dy[] = {0, 0, 1, -1, 1, -1, 1, -1};
int pre;
string second;
int reverse(int x) {
  int ret = 0;
  for (int i = 0; i < (8); ++i) {
    if (x & (1 << i)) ret |= (1 << (7 - i));
  }
  return ret;
}
int main() {
  getline(cin, second);
  for (int i = 0; i < (((int)(second).size())); ++i) {
    int cur = reverse(second[i]);
    printf("%d\n", (pre - cur + 256) & 255);
    pre = cur;
  }
}
