If all the list within the list has at least 4 entries then it might be more efficient to perform a vector comparison rather than using an iterator.
See: https://code.kx.com/q4m3/3_Lists/#310-elided-indices
list[;3]where(list[;0]=`ABC)&list[;2]=`XYZ / to get all the matching entries
list[;3]first where(list[;0]=`ABC)&list[;2]=`XYZ / to get only the first match