Substrings on a Tree | CodeChef