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  (10^9 + 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 (10^9 + 7) in separate line. 

Constraints

1 ≤ T ≤  10 
1 ≤ n ≤  10^5 


Constraints

Example
Input:
2
z
abcd

Output:
0
144
from collections import Counter

# compute factorials and inverse factorials
mod = 10**9 + 7
N = 10**5 + 11
fac = [1]*N
ifc = [1]*N
for i in xrange(2,N):
    ifc[i] = (mod - mod/i) * ifc[mod%i] % mod

for i in xrange(2,N):
    fac[i] = fac[i-1] *     i  % mod
    ifc[i] = ifc[i-1] * ifc[i] % mod

for cas in xrange(input()):
    # only the frequencies of letters matter
    A = Counter(raw_input().strip()).values()
    t = 0

    # no swap
    t += 1

    # 1 swap
    for i in xrange(len(A)):
        for j in xrange(i):
            t += A[i] * A[j]

    # 2 swaps, ab cd
    for i in xrange(len(A)):
        for j in xrange(i):
            for k in xrange(j):
                for l in xrange(k):
                    t += 3 * A[i] * A[j] * A[k] * A[l]

    # 2 swaps, ab ac
    for i in xrange(len(A)):
        for j in xrange(len(A)):
            if i != j:
                for k in xrange(j):
                    if i != k:
                        t += A[i] * (A[i]-1) * A[j] * A[k]

    # 2 swaps, ab ab
    for i in xrange(len(A)):
        for j in xrange(i):
            t += A[i] * (A[i]-1)/2 * A[j] * (A[j]-1)/2

    # 2 swaps, abc
    for i in xrange(len(A)):
        for j in xrange(i):
            for k in xrange(j):
                t += A[i] * A[j] * A[k] * 2

    p = fac[sum(A)]
    for i in xrange(len(A)):
        p = p * ifc[A[i]] % mod
    print (p * p - p * t) % mod