# Problem Description
This is a hexagonal pyramid number pattern problem where we need to generate the nth row of numbers following specific rules. Each row contains numbers arranged in hexagonal cells, with the first row having one cell, and each subsequent row adding one more cell than the previous row. The function should return all numbers in the requested row as a list.

# Visual Facts
1. The structure is a triangular arrangement of hexagonal cells
2. Each row n contains n cells
3. Row 1: [1]
4. Row 2: [2, 2]
5. Row 3: [3, 4, 3]
6. Row 4: [4, 12, 12, 4]
7. Row 5: [5, 48, 144, 48, 5]
8. All rows start and end with corresponding row number
9. The arrow marks in the image indicate multiplication relationships between cells

# Visual Patterns
1. Pattern for number of elements:
   - Row n contains n elements

2. Edge elements pattern:
   - First and last elements of every row are corresponding row number

3. Middle elements calculation pattern:
   - For row ≥ 3, each non-edge cell is calculated by multiplying the two cells above it
   - Example: In row 4, 12 = 3 × 4 (from row 3)
   - Example: In row 5, 48 = 4 × 12 (from row 4)

4. Symmetry pattern:
   - Each row is symmetrical from left to right
   - Example: Row 4: [4, 12, 12, 4]
   - Example: Row 5: [5, 48, 144, 48, 5]


# Solution
from typing import List

def solution(n: int) -> List[int]:
    """
    Returns the numbers in the specified row.

    Parameters:
        n (int): The row number to retrieve. (n > 1)

    Returns:
        List[int]: A list containing all numbers in the nth row.     
    """
    ret = list()
    for i in range(n):
        row = list()
        for j in range(0, i + 1):
            if j == 0 or j == i:
                row.append(i + 1)
            else:
                row.append(ret[i - 1][j] * ret[i - 1][j - 1])
        ret.append(row)
    return ret[n - 1]


# Test Script
def test():
    test_cases = [
        (1, [1]),
        (2, [2, 2]),
        (3, [3, 4, 3]),
        (4, [4, 12, 12, 4]),
        (5, [5, 48, 144, 48, 5]),
        (6, [6, 240, 6912, 6912, 240, 6]),
        (7, [7, 1440, 1658880, 47775744, 1658880, 1440, 7]),
        (8, [8, 10080, 2388787200, 79254226206720, 79254226206720, 2388787200, 10080, 8]),
        (9, [9, 80640, 24078974976000, 189321481108517289984000, 6281232371625943240173158400, 189321481108517289984000, 24078974976000, 80640, 9]),
        (10, [10, 725760, 1941728542064640000, 4558667206031244565988071440384000000, 1189172215782988266980141580906985588465965465600000, 1189172215782988266980141580906985588465965465600000, 4558667206031244565988071440384000000, 1941728542064640000, 725760, 10]),
    ]

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

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

test()