Jyoti Agrawal's submission of Treeversion | CodeChef