The T9 typing predictor helps with suggestions for possible word combinations on an old-style numeric keypad phone. Each digit in the keypad (2-9) represents a group of 3-4 letters. To type a letter, press once the key which corresponds to the letter group that contains the required letter. Typing words is done by typing letters of the word in sequence.
The letter groups and corresponding digits are as follows:
```
 -----------------
|  1  |  2  |  3  |
|     | ABC | DEF |
|-----|-----|-----|
|  4  |  5  |  6  |
| GHI | JKL | MNO |
|-----|-----|-----|
|  7  |  8  |  9  |
| PQRS| TUV | WXYZ|
 -----------------
```
The prediction algorithm tries to match the input sequence against a predefined dictionary of words. The combinations which appear in the dictionary are considered valid words and are shown as suggestions.
Given a list of words as a reference dictionary, and a non-empty string (of digits 2-9) as input, complete the function which returns suggestions based on the string of digits, which are found in the reference dictionary.
For example:
```python
T9(['hello', 'world'], '43556') returns ['hello']
T9(['good', 'home', 'new'], '4663') returns ['good', 'home']
```
Note that the dictionary must be case-insensitive (`'hello'` and `'Hello'` are same entries). The list returned must contain the word as it appears in the dictionary (along with the case).
Example:
```python
T9(['Hello', 'world'], '43556') returns ['Hello']
```
If there is no prediction available from the given dictionary, then return the string containing first letters of the letter groups, which correspond to the input digits.
For example:
```python
T9([], '43556') returns ['gdjjm']
T9(['gold', 'word'], '4663') returns ['gmmd']
```
CHR_TO_NUM = str.maketrans("abcdefghijklmnopqrstuvwxyz", "22233344455566677778889999")
NUM_TO_CHR = str.maketrans("23456789", "adgjmptw")

def T9(words, seq):
    return [word for word in words if word.lower().translate(CHR_TO_NUM) == seq] \
            or [seq.translate(NUM_TO_CHR)]
CHR_TO_NUM = str.maketrans("abcdefghijklmnopqrstuvwxyz", "22233344455566677778889999")
NUM_TO_CHR = str.maketrans("23456789", "adgjmptw")

def T9(words, seq):
    return [word for word in words if word.lower().translate(CHR_TO_NUM) == seq] \
            or [seq.translate(NUM_TO_CHR)]