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