Help with CHFICRM

I’ve read other solutions and my solution has similar logic as accepted solutions.
I realized that using HashMap was unnecessary but still can someone tell me which cases are not handled in my solution?

Here is the question and this is my solution.

I have handled all cases where output is “NO” in the 1st if statement on line 22 of my solution.

Read the whole input for each testcase, You are breaking the loop if you are confirmed that answer will be “NO”.

Fixing that break statement solved the issue and here I was trying to think of all the possible edge cases that I must’ve missed :joy:
Thank You.