Break the loop if the answer is matched