Piyush And Magical Park

Unable to pass testcase 2 and 3

hi ravi
share your code