Sereja has a string A consisting of n lower case English letters. 

Sereja calls two strings X and Y each of length n similar if they can be made equal by applying the following operation at most once in each of them.

- Chose any two position i, j in the string (i can be equal to j too). Swap the characters at position i with character at position j.

For example strings "abcd" and "acbd" are similar, strings "ab" and "ab" are similar, but strings "abcde" and "bcdea" are not similar. Note that strings  "abc" and "cab" are also similar, as you can swap 'a' and 'c' in the first string to get "cba" and 'a' and 'b' in the second string to get "cba". 

Now Sereja is interested in finding number of ordered pairs of non similar strings X and Y such that they can be constructed from a given string A by permutation of its characters. As answer could be large, please output your answer modulo  (109 + 7).

Note 

A string s (of size n) is said to be constructed from string t (also of size n) by permutation of its characters if there exists a permutation P (of length n), such that s[i] = t[P[i]] for each i from 1 to n.

-----Input-----
- First line contain integer T - number of test cases. 
- For each of the next T lines: 
	
- Each line contains a string A as defined in the problem.

-----Output-----
For each test case, output answer modulo 1000000007 (109 + 7) in separate line. 

-----Constraints-----
- 1 ≤ T ≤  10 
- 1 ≤ n ≤  10^5 

-----Constraints-----
- Subtask #1: 1 ≤ n ≤  10  (25 points)
- Subtask #2: 1 ≤ n ≤  100  (25 points)
- Subtask #3: 1 ≤ n ≤  1000  (25 points)
- Subtask #4: original constraints (25 points)

-----Example-----
Input:
2
z
abcd

Output:
0
144

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "M=1000000007\ndef f(n,r):\n\tif n==0:\n\t\treturn 0\n\tif r==0:\n\t\treturn 1\n\tif r>n :\n\t\treturn 0\n\tif (r>n/2) :\n\t\tr=n-r\n\ta=1;\n\tfor i in range(0,r):\n\t\ta=a*n\n\t\tn=n-1\n\tfor i in range(0,r):\n\t\ta=(a/(i+1))\n\treturn a%M\nT=int(eval(input()))\nfor i in range(0,T):\n\tA=input()\n\ta = [0 for i in range(0,26)]\n\tfor letter in A:\n\t\ta[ord(letter)-ord('a')]=a[ord(letter)-ord('a')]+1\n\tnways=1\n\tk=len(A)\n\tfor i in range(0,26):\n\t\tnways = (nways * f(k,a[i]))%M\n\t\tk=k-a[i]\n\t\tif k==0:\n\t\t\tbreak\n\td2=0\n\td3=0\n\td4=0\n\td211=0\n\td22=0\n\tfor i in range(0,26):\n\t\tfor j in range(i+1,26):\n\t\t\td2 = (d2 + ((a[i]*a[j])%M) )%M\n\t\t\td22 = (d22 + ((f(a[i],2)*f(a[j],2))%M) )%M\n\t\t\tfor k in range(j+1,26):\n\t\t\t\td3 = (d3 + (( a[k]*((a[i]*a[j])%M) )%M) )%M\n\t\t\t\td211 = (d211 + (( f(a[k],2)*((a[i]*a[j])%M) )%M) )%M\n\t\t\t\td211 = (d211 + (( f(a[j],2)*((a[k]*a[i])%M) )%M) )%M\n\t\t\t\td211 = (d211 + (( f(a[i],2)*((a[j]*a[k])%M) )%M) )%M\n\t\t\t\tfor l in range(k+1,26):\n\t\t\t\t\td4 = (d4 + (( ((a[i]*a[j])%M) * ((a[k]*a[l])%M) )%M) )%M\n\tans = (1 + d2 + (d3*2) + (d4*3) + (d211*2) + d22 )%M\n\tans = (nways - ans + M)%M\n\tans = (nways * ans)%M\n\tprint(ans)"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 17862