Mohan Abhyas's submission of Treeversion | CodeChef