Looks good. It's there a way to terminate the search early for a line when you find a hit? Eg if a line is good in part 1 you don't even need to explore removing each element.
Efficiency isn't very important here since it's quick, but would be an interesting improvement.