#include <bits/stdc++.h>
using namespace std;
vector<int> rev(101);
int mod(int n) {
  if (n < 0) {
    return 256 + n;
  } else {
    return n % 256;
  }
}
void get(char u, int pos) {
  int x = u;
  vector<int> bin(8, 0);
  int i = 0;
  while (x) {
    bin[i++] = x % 2;
    x /= 2;
  }
  long long k = 0;
  for (int i = 0; i < 8; ++i) {
    if (bin[i] == 0) continue;
    k += int(pow(2, 8 - 1 - i));
  }
  rev[pos] = k;
}
int reve(int k) {
  vector<int> bin(8, 0);
  int i = 0;
  while (k) {
    bin[i++] = k % 2;
    k /= 2;
  }
  long long x = 0;
  for (int i = 0; i < 8; ++i) {
    if (bin[i] == 0) continue;
    x += int(pow(2, 8 - 1 - i));
  }
  return x;
}
int main() {
  ios::sync_with_stdio(0);
  string a;
  getline(cin, a);
  int n = a.size();
  vector<int> ans(n);
  for (int i = 0; i < n; ++i) {
    get(a[i], i);
  }
  for (int i = 0; i < n; ++i) {
    if (i == 0)
      ans[i] = mod(-rev[0]);
    else {
      ans[i] = mod(rev[i - 1] - rev[i]);
    }
  }
  for (auto k : ans) {
    cout << k << endl;
  }
  return 0;
}
