@staticmethod
def grid2pixel(grid: list[list[str]]) -> dict[(tuple[(int, int)], str)]:
    image = {}
    for y in range(len(grid)):
        for x in range(len(grid[0])):
            image[(x, y)] = grid[y][x]
    return image
@staticmethod
def grid2pixel(grid: list[list[str]]) -> dict[(tuple[(int, int)], str)]:
    image = {}
    for y in range(len(grid)):
        for x in range(len(grid[0])):
            image[(x, y)] = grid[y][x]
    return image