import std.stdio;void main(){int i=0;for(string s=readln;i<33;i++)write(s[i]&s[i+5]&s[i+12]&s[i+17]&1);for(i=0;i<17;i++)write(0);}