#include <bits/stdc++.h>
using namespace std;
int arr[100012];
int bin(string s) {
  int sum = 0, c = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '1') {
      sum = sum + pow(2, c);
    }
    c++;
  }
  return sum;
}
int revers(int num) {
  int k = 0;
  int rev = 0;
  while (num) {
    int x = num % 10;
    rev = rev * 10 + x;
    num /= 10;
  }
  return rev;
}
int main() {
  int k = 0;
  char ch[500];
  gets(ch);
  int n = strlen(ch);
  int x = ch[0];
  bitset<8> y(x);
  string a = (string)(y.to_string());
  reverse(a.begin(), a.end());
  int nn = bin(a);
  arr[k++] = 256 - nn;
  for (int i = 1; i < n; i++) {
    int x = ch[i - 1];
    bitset<8> y(x);
    string a = (string)(y.to_string());
    reverse(a.begin(), a.end());
    int n1 = bin(a);
    x = ch[i];
    bitset<8> z(x);
    string b = (string)(z.to_string());
    reverse(b.begin(), b.end());
    int n2 = bin(b);
    arr[k++] = (256 - n2 + n1) % 256;
  }
  for (int i = 0; i < k; i++) cout << arr[i] << endl;
}
