#include <bits/stdc++.h>
using namespace std;
char ch[120];
int n;
int getRev(int uu) {
  int con = 0;
  int arr[12];
  while (1) {
    con++;
    arr[con] = uu % 2;
    uu = uu / 2;
    if (con == 8) break;
  }
  int sum = 0;
  int p = 1;
  for (int i = 8; i >= 1; i--) {
    sum = sum + (arr[i] * p);
    p = p * 2;
  }
  return sum;
}
void cal() {
  int pre = 0;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int k = ch[i];
    k = getRev(k);
    sum = (pre - k + 256) % 256;
    pre = k;
    cout << sum << endl;
  }
}
int main() {
  gets(ch);
  n = strlen(ch);
  cal();
  return 0;
}
