Help me in solving VANDH problem

My issue

My code

# cook your dish here

Problem Link: VANDH Problem - CodeChef