Samarth Gupta's submission of Forgotten Tree 9 | CodeChef