#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
const int N = 100010;
string get_bin(int c) {
  string s;
  for (int i = 0; i < 8; ++i) {
    s.push_back((c % 2) + '0');
    c /= 2;
  }
  return s;
}
int get_val(string s) {
  reverse(s.begin(), s.end());
  long long pot = 1;
  long long sum = 0;
  for (int i = 0; i < 8; ++i) {
    if (s[i] == '1') sum += pot;
    pot *= 2;
  }
  return sum;
}
char out[10231123];
int main() {
  string s;
  scanf(" %[^\n]", out);
  s = (string)out;
  string ult = "00000000";
  for (int i = 0; i < s.size(); ++i) {
    string f = get_bin(s[i]);
    int val = get_val(f);
    int oth = get_val(ult);
    int ans = (oth - val + 512) % 256;
    printf("%d\n", ans);
    ult = f;
  }
  return 0;
}
