# Problem Description
This appears to be a phone keypad mapping problem where we need to convert a string of lowercase characters into a sequence of numbers based on an old mobile phone keypad layout. Each character in the input string should be mapped to the corresponding keypad number where that character appears.

# Visual Facts
1. The image shows a modified phone keypad layout with numbers 1-9 and 0
2. Each number key (except 0 and 1) has associated letters:
   - 2: DEF
   - 3: ABC
   - 4: MNO
   - 5: JKL
   - 6: GHI
   - 7: PQR
   - 8: STUV
   - 9: WXYZ
3. Four example mappings are provided:
   - "cat" → [3,3,8]
   - "abcdefg" → [3,3,3,2,2,2,6]
   - "hello" → [6,2,5,5,4]
   - "gjdaqzt" → [6,5,2,3,7,9,8]
   - "pqrwxyz" → [7,7,7,9,9,9,9]
4. Special characters * and # are present on the keypad
5. All letters are shown in uppercase on the keypad

# Visual Patterns
1. Each character in the input maps to the number key where it appears on the keypad
2. Numbers 1, 0, *, and # don't appear in any of the example outputs, suggesting they aren't used in the mapping
3. The output length always matches the input string length
4. Each output number corresponds to a valid key containing letters (2-9 only)


# Solution
from typing import List

def solution(s: str) -> List[int]:
    """
    Converts a string into a list of corresponding integer values.

    Parameters:
        s (str): The input string to be converted. (lowercase)

    Returns:
        List[int]: A list of integers corresponding to the input string characters.
    """
    char_to_digit = {
        'a': 3, 'b': 3, 'c': 3,
        'd': 2, 'e': 2, 'f': 2,
        'g': 6, 'h': 6, 'i': 6,
        'j': 5, 'k': 5, 'l': 5,
        'm': 4, 'n': 4, 'o': 4,
        'p': 7, 'q': 7, 'r': 7, 's': 8,
        't': 8, 'u': 8, 'v': 8,
        'w': 9, 'x': 9, 'y': 9, 'z': 9
    }

    result = [char_to_digit[char.lower()] for char in s if char.lower() in char_to_digit]
    
    return result


# Test Script
def test():
    test_cases = [
        ("gjdaqzt", [6, 5, 2, 3, 7, 9, 8]),
        ("abcdefg", [3, 3, 3, 2, 2, 2, 6]),
        ("hello", [6, 2, 5, 5, 4]),
        ("world", [9, 4, 7, 5, 2]),
        ("cat", [3, 3, 8]),
        ("pqrwxyz", [7, 7, 7, 9, 9, 9, 9]),
        ("aisuyfgiauwedoushdfo", [3, 6, 8, 8, 9, 2, 6, 6, 3, 8, 9, 2, 2, 4, 8, 8, 6, 2, 2, 4]),
        ("sdiyfgiwueodw", [8, 2, 6, 9, 2, 6, 6, 9, 8, 2, 4, 2, 9]),
        ("eqefes", [2, 7, 2, 2, 2, 8]),
        ("dfgawes", [2, 2, 6, 3, 9, 2, 8]),
    ]

    for s, expected_output in test_cases:
        try:
            output = solution(s)
        except Exception as e:
            error_message = (
                f"An exception occurred while running the test case:\n"
                f"`s`: {s}\n\n"
                f"Exception: '{str(e)}'"
            )
            assert False, error_message

        if output != expected_output:
            error_message = (
                f"The following Test Case failed:\n"
                f"`s`: {s}\n\n"
                f"Actual Output: {output}\n"
                f"Expected Output: {expected_output}"
            )
            assert False, error_message

test()