i tried on hackerblocks
@yaswanth0412 can you send the question link too
piyush and the magical park
https://hack.codingblocks.com/app/practice/6/1051/problem
@yaswanth0412 corrected and commented dont forget to hit like and mark resolved if cleared