not able to verify the condition but when run in intellij , I am getting the expected output. I believe it would be worth highlighting the errors with respect to test cases for this program. Thanks.