You are given a string $$$s$$$, consisting of lowercase Latin letters.
You can perform the following operation:
For example, if $$$s$$$ is abaabc, you can transform it into babc (by using $$$l=1$$$, $$$r=3$$$, $$$c =$$$ 'a'), abaac (by using $$$l=4$$$, $$$r=6$$$, $$$c =$$$ 'b') and abaabc (by using $$$l=2$$$, $$$r=5$$$, $$$c =$$$ 'c').
Your task is to calculate the number of different strings that can be obtained using the aforementioned operation exactly once.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.
The only line of each test case contains a string $$$s$$$ ($$$1 \le |s| \le 2 \cdot 10^5$$$), consisting of lowercase Latin letters.
Additional constraint on the input: the sum of $$$|s|$$$ over all test cases doesn't exceed $$$2 \cdot 10^5$$$.
For each test case, print a single integer — the number of different strings that can be obtained using the aforementioned operation exactly once.
4abaabcqfxicpc
10326
All the possible strings that can be obtained in the first example:
| Name |
|---|


