Anshal Dwivedi's submission of Alternating Tree | CodeChef