Sergey's submission of Rich Substrings | CodeChef