Long ago, in a kingdom of words, there was a librarian who loved palindromes. Whenever she found a scroll of letters, she tried to cut it into pieces so that each piece could be rearranged into a palindrome. She called such magical pieces AnapalinDromes. For example, the piece "aabb" is an AnapalinDrome as it could be rearranged to "abba", which is a palindrome. Similarly, "a", "aa", and "aba" are AnapalinDromes.
Now she has given you a scroll written as a string $$$s$$$. Your task is to help her count the following:
Since the number can be large, output it modulo $$$10^9 + 7$$$.
The first line contains a single integer $$$t$$$ — the number of test cases. Each of the next $$$t$$$ lines contains a string $$$s$$$ consisting of lowercase English letters.
For each test case, print a single integer - the sum of scores of all valid partitions of the string, modulo $$$10^9 + 7$$$.
2 aab abc
6 3
| Name |
|---|


