r=x-p[x]?x=p[x],r:x f='y|=a[i]==a[x+=i]&&(p[x=i,u=r]=r)==u' p=({0..9999}) read w h read -dx -aa for((;x=iy;~i%w&&f,x=w,f,++i)){ :;} im echo ${_[y]}possible