#include <bits/stdc++.h>
using namespace std;
long long SI() {
  long long x;
  cin >> x;
  return x;
}
long long mod(long long a) { return a < 0 ? -a : a; }
int rev_num(int num) {
  int rev_number = 0;
  for (int i = 0; i < 8; i += 1) {
    if (num % 2 && 1) rev_number += (1 << 7 - i);
    num >>= 1;
  }
  return rev_number;
}
int main() {
  string x;
  getline(cin, x);
  int prev_result = 0;
  for (auto y : x) {
    if (y >= 32 && y <= 126) {
      int num = rev_num(prev_result);
      cout << (num - rev_num(y) + 256) % 256 << endl;
      prev_result = y;
    } else {
      break;
    }
  }
  return 0;
}
