#include <bits/stdc++.h>
using namespace std;
void sprint(string s) {
  for (int i = 0; i < s.size(); ++i) printf("%c", s[i]);
  printf("\n");
}
char s[101];
int rever(int id) {
  vector<int> v(8, 0);
  int i = 0;
  while (id > 0) {
    v[i] = id % 2;
    id /= 2;
    i++;
  }
  int ans = 0;
  for (int i = 0; i < 8; ++i) {
    if (v[i]) ans += 1 << (7 - i);
  }
  return ans;
}
void f(int id) {
  int x = rever((int)s[id]);
  int y = rever((int)s[id - 1]);
  printf("%d\n", (256 + y - x) % 256);
}
int main() {
  cin.getline(s, 101);
  int t = s[0];
  t = rever(t);
  printf("%d\n", 256 - t);
  for (int i = 1; i < 101; ++i) {
    if ((int)s[i] == 0) break;
    f(i);
  }
  return 0;
}
