#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) {
  return a.second < b.second && a.first << b.first;
}
long long bigmod(int b, int p, int m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    long long temp = bigmod(b, p / 2, m);
    return (temp * temp) % m;
  }
  return (bigmod(b, p - 1, m) * (b % m)) % m;
}
const int Mod = 256;
string s;
int bin[8] = {0}, ans = 0, pre = 0;
string binary(int in) {
  string ans = "";
  while (in) {
    if (in % 2)
      ans += '1';
    else
      ans += '0';
    in /= 2;
  }
  while (ans.size() < 8) ans += '0';
  return ans;
}
int rev(int in) {
  int ans = 0, num = 0;
  string an = binary(in);
  for (int h = an.size() - 1; h > -1; h--) {
    if (an[h] == '1') ans += (int)powf(2, num);
    num++;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  ans = pre = 0;
  getline(cin, s);
  for (int i = 0; i < s.size(); i++) {
    ans = rev(s[i]);
    if (!i)
      pre = 0;
    else
      pre = rev(s[i - 1]);
    cout << (pre - ans + Mod) % Mod << '\n';
  }
  return 0;
}
