Solution for Manasa and Stones Challenge