#include<iostream>
using namespace std;
#include<string>
#include<algorithm>
//转成二进制
string trans(int n) {
if (n == 0)return "0";
string res;
while (n != 0) {
res += (n % 2) + '0';
n /= 2;
}
reverse(res.begin(), res.end());
while (res.size() < 8) {
res.insert(0, 1,'0');
}
return res;
}
int main() {
string input;
while (cin >> input) {
for (int i = 0; i < input.size(); i++) {
string s = trans(input[i]);
int count = 0;
for (int i = 1; i < 8; i++) {
if (s[i] == '1')count++;
}
if (count % 2 == 0) {
s[0] = '1';
}
else {
s[0] = '0';
}
cout << s << endl;
}
}
return 0;
}