On Miu's smart phone, there is a search feature which lets her search for a contact name by typing digits on the keypad where each digit may correspond to any of the characters given below it. For example, to search for TOM, she can type 866 and for MAX she can type 629.
+------+-----+------+
|   1  |  2  |   3  |
|      | ABC |  DEF |
+------+-----+------+
|   4  |  5  |   6  |
|  GHI | JKL |  MNO |
+------+-----+------+
|   7  |  8  |   9  |
| PQRS | TUV | WXYZ |
+------+-----+------+
|      |  0  |      |
+------+-----+------+

Miu typed a random string of digits $S$ on the keypad while playing around, where each digit is between 2 and 9 inclusive. Now she wants to know the number of possible strings which would map to $S$. 
Since this number can be very large, output it modulo 10^9 + 7 (1000000007)

-----Input:-----
- 
The first line of the input consists of a single integer $T$ denoting the number of test cases.
- 
Each test case consists of a string $S$.

-----Output:-----
- For each test case, print a single line containing one integer - the count of all possible strings mod 1,000,000,007

-----Constraints-----
- 
1 <= $T$ <= 10
- 
1 <= $|S|$ <= 105

-----Subtasks-----
Subtask #1 (10 points):
- 1 <= $|S|$ <= 10
Subtask #2 (90 points):
- Original Constraints

-----Sample Input:-----
2

5

72  

-----Sample Output:-----
3

12  

-----EXPLANATION:-----
- 
Example Case 1:

On the key 5, we have the character set JKL.

Hence the possible strings are J,K,L.

Hence the answer is 3 % (1000000007) = 3.  
- 
Example Case 2:
On key 7, we have the character set PQRS.

On key 2, we have the character set ABC.

Hence the possible strings are PA,PB,PC,QA,QB,QC,RA,RB,RC,SA,SB,SC.

Hence the answer is 12 % (1000000007) = 12.

```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 = '# cook your dish here\nt=int(input())\nwhile(t>0):\n n=int(input())\n c=1\n while(n>0):\n  m=n%10\n  if(m==7 or m==9):\n   c*=4\n  else:\n   c*=3\n  n=n//10\n print(c%1000000007)\n t-=1'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 12943