from pathlib import Path


def read_height_map(filename: Path) -> list[list[int]]:
    """read height map from file

    Args:
        filename (Path): path to the input file.

    Returns:
        list[list[int]] heightmap

    Examples:
        >>> read_height_map(Path("test_data/day_9.data"))[0]
        [2, 1, 9, 9, 9, 4, 3, 2, 1, 0]
    """
    height_map = []
    with filename.open("r") as file:
        for line in file:
            height_map.append([int(x) for x in list(line.strip())])
    return height_map