#include <bits/stdc++.h>
using namespace std;
int reverse(int a) {
  int ans = 0, i, j, k;
  for (i = 0; i < 8; i++) {
    ans = ans * 2 + (a % 2);
    a /= 2;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  getline(cin, s);
  int n = s.length(), i, j, k, last = 0, x, a, r;
  for (auto ch : s) {
    a = reverse(last);
    r = reverse(ch);
    x = (a + 256 * 10 - r) % 256;
    cout << x << "\n";
    last = ch;
  }
  return 0;
}
