@_=(1..<>); $i=!map$_[$i++]*=/-|^nyanpass$/,glob for<>; @g=grep$_,@_; print@g-1?-1:@g