XY's submission of Max-digit Tree | CodeChef