As we know Prince Batra is most intelligent boy of Nehru Hall but one day Rohit says to Prince "Tumse Naa Ho Paayega" . To prove Rohit wrong Prince challenges to Rohit to give any problem and he will solve it . So Rohit gave the following problem :
Given a string S , A substring of S is said to be special if either of the property satisfies :
Find total number of special substrings of S.
Help Rohit to solve the problem and make him prove that he is most intelligent guy of Nehru Hall.
INPUT FORMAT:
OUTPUT FORMAT:
CONSTRAINTS:
1<T<100
1<length(S)<5*105
0<count of substring<106