Let's define that a string $$$s$$$ is considered better than another string $$$t$$$ if and only if both of the following conditions are met:
Alice has a string $$$s$$$ of length $$$N$$$. She wants to split the string into $$$K$$$ continuous substrings $$$s[1 : p_1], s[p_1 + 1 : p_2], \dots, s[p_{K - 1} + 1 : p_K]$$$ such that:
The first line of input contains a single integer $$$T$$$ denoting the number of test cases.
Each test case consists of a single line containing a lowercase letter string $$$s$$$.
For each test case, output the maximum possible value of $$$K$$$.
2abababaaababaddb
2 4
| Name |
|---|


