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 = 'from collections import Counter\n\nclass FastScanner:\n    def __init__(self):\n        import sys\n        self.inp = sys.stdin.read().split()\n        self.readAt = -1\n    def nextInt(self):\n        self.readAt += 1\n        return int(self.inp[self.readAt])\n    def nextString(self):\n        self.readAt += 1\n        return self.inp[self.readAt]\n    def nextRange(self, n):\n        self.readAt += n\n        return self.inp[self.readAt-n+1:self.readAt+1]\n    def skip(self, n):\n        self.readAt += n\n \nclass PrintWriter:\n    def __init__(self):\n        self.pw = []\n    def println(self, n):\n        self.pw.append(n)\n    def flush(self):\n        print("\\n".join(map(str, self.pw)))\n        self.pw = []\n\nclass Factorial:\n    def __init__(self, limit, MOD):\n        self.fac = [1]\n        for i in range(1, limit+1):\n            self.fac.append((i*self.fac[-1]) % MOD)\n    def __getitem__(self, n):\n        return self.fac[n]\n\ndef modInverse(n, p):\n    return pow(n, p-2, p)\n\ndef nCr(n, r, f, MOD):\n    if r>n: return 0\n    x = f[n] % MOD\n    y = f[r] % MOD\n    z = f[n-r] % MOD\n    return (x * modInverse(y, MOD) * modInverse(z, MOD)) % MOD\n\ndef main():\n    MOD = 1000000007\n    limit = 100000\n    fs = FastScanner()\n    pw = PrintWriter()\n    f = Factorial(limit, MOD)\n    t = fs.nextInt()\n    for i in range(t):\n        A = fs.nextString()\n        n = len(A)\n        mapp = Counter(A)\n        combs = f[n]\n        sim2 = nCr(n, 2, f, MOD)\n        sim3 = nCr(n, 3, f, MOD)\n        sim4 = nCr(n, 4, f, MOD) * 3\n        nm2c2 = nCr(n-2, 2, f, MOD)\n        for i in mapp:\n            combs = (combs * modInverse(f[mapp[i]], MOD)) % MOD\n            ncr2 = nCr(mapp[i], 2, f, MOD)\n            rest = n - mapp[i]\n            sim2 -= ncr2\n            sim3 -= ncr2*rest\n            sim4 -= ((nm2c2 * ncr2) % MOD)\n            ncr3 = nCr(mapp[i], 3, f, MOD)\n            sim3 -= ncr3\n            ncr4 = nCr(mapp[i], 4, f, MOD)\n            sim4 += ((ncr4 * 3) % MOD)\n        summ = ((combs * (combs-1)) % MOD)\n        sim2 = ((combs * sim2 * 1) % MOD)\n        sim3 = ((combs * sim3 * 2) % MOD)\n        sim4 = ((combs * sim4) % MOD)\n        pw.println((summ - (sim2 + sim3 + sim4)) % MOD)\n    pw.flush()\n\ndef __starting_point():\n    main()\n\n__starting_point()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 4023519