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