#P6480. A Count Task

A Count Task

Problem Description

Count is one of WNJXYK’s favorite tasks. Recently, he had a very long string and he wondered that how many substrings which contains exactly one kind of lowercase in this long string. But this string is so long that he had kept counting for several days. His friend Kayaking wants to help him, so he turns to you for help.

Input

The input starts with one line contains exactly one positive integer $T$ which is the number of test cases.
Each test case contains one line with a string which you need to do a counting task on.

Output

For each test case, output one line containing “y” where y is the number of target substrings.

3 qwertyuiop qqwweerrttyyuuiioopp aaaaaaaaaa
10 30 55

Hint


1<=T<=20,1<=len(string)<=10^5,1<=∑len(string)<=10^5
Strings only contain lowercase English letters.