#include <bits/stdc++.h>
using namespace std;
static const int OO = 0x3f3f3f3f, N = 150;
static const long long OOL = 0x3f3f3f3f3f3f3f3fLL;
string second;
long long comp(string a) {
  long long ans = 0, x = 1;
  for (int i = 0; i < ((int)(a).size()); ++i) {
    if (a[i] == '1') ans += x;
    x *= 2;
  }
  return ans;
}
int main() {
  getline(cin, second);
  int prev = 0;
  for (int i = 0; i < ((int)(second).size()); ++i) {
    int calc = (int)second[i];
    bitset<8> n(calc);
    string a = n.to_string();
    calc = comp(a);
    cout << (((prev - calc) + 256) % 256) << endl;
    prev = calc;
  }
}
