#include <bits/stdc++.h> #define MAX 10 using namespace std; int res[MAX]; int d2b(int n) { int i = 0; memset(res, 0, sizeof(res)); while (n) { res[i++] = n % 2; n /= 2; } int sum = 0; for (int j = i - 1; j >= 0; j--) if (res[j] == 1) sum++; if (sum % 2 == 0) //偶数个1 return 0; else return 1; } int main() { string s; while (cin >> s) { for (int i = 0; i < s.size(); i++) { // cout<<(int)s[i]<<endl; if (!d2b((int)s[i])) res[7] = 1; for (int i = 7; i >= 0; i--) cout << res[i]; cout << endl; } } }