char*p,s[99];n,i;main(u){read(0,p=s,s);for(n=index(s,10)-s;*p;putchar(*p-10&&u-2?u-3?48:49:*p),p++)for(u=p[-1]%2+p[1]%2,i=3;i--;)u+=p[-n-i]%2+p[n+i]%2;}