c,*m=*$< r=m.index{c=_1.index ?R} 1while ?.==x=m[r=(1+s=r)%m.size][c=(1+t=c)%~-m[0].size] puts x==?R?:loop:"#{s+1} #{t+1}"