#include <bits/stdc++.h>
using namespace std;
char s[110];
bool a[10];
int main() {
  int x, y, pow = 1, t, k, b = 0;
  gets(s);
  k = strlen(s);
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < 8; j++) a[j] = 0;
    x = (int)s[i];
    for (int j = 0; j < 8; j++) {
      if (x % 2 == 1)
        a[j] = 1;
      else
        a[j] = 0;
      x /= 2;
    }
    t = 0;
    pow = 1;
    for (int j = 7; j >= 0; j--) {
      t += pow * a[j];
      pow *= 2;
    }
    y = (256 - t + b) % 256;
    b = t;
    cout << y << endl;
  }
  scanf(" ");
}
