#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};
string toBinary(int x) {
  string ret = "";
  while (x) {
    ret = (x & 1 ? '1' : '0') + ret;
    x >>= 1;
  }
  while (((int)(ret).size()) < 8) {
    ret = '0' + ret;
  }
  return ret;
}
int toDec(string x) {
  int ret = 0, val = 1;
  for (int i = 7; i >= 0; --i) {
    if (x[i] == '1') ret += val;
    val <<= 1;
  }
  return ret;
}
string second;
vector<int> s1;
int main() {
  getline(cin, second);
  s1.push_back(0);
  for (int i = 0; i < (((int)(second).size()) - 1); ++i) {
    string temp = toBinary(second[i]);
    reverse(temp.begin(), temp.end());
    s1.push_back(toDec(temp));
  }
  for (int i = 0; i < (((int)(second).size())); ++i) {
    string temp = toBinary(second[i]);
    reverse(temp.begin(), temp.end());
    int res = toDec(temp);
    printf("%d\n", (s1[i] - res + 256) & 255);
  }
}
