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