typedef long long l;l m=1e14-3,a[9000],*p=a;l g(l x,l y){*a=y?y%2*x+g(x*2%m,y/2):0;}main(j){for(;++p-a<8?~scanf(""-4,p):p-a+~a[7]*8?*p=(g(p[j%9-1],p[j/11-3])+g(p[j%9],p[j/9]))%m:(vprintf("%jd %jd\n",p-3),p=a);j=-"=>OPjb"[p-a&7]);}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).