from typing import List
from typing import Dict


def grid_values(puzzle:str,boxes:List[str],replace:bool=True) -> Dict[str,str]:
    """This function maps each puzzle unit to its box unit.
    Args:
        puzzle (str): String of puzzle
        boxes (List[str]): A list of box units
        replace (bool) : An option to relace dots with number 1-9.Defaults to True
    Returns:
        Dict[str,str]: A dictionary of box units with its puzzle value.
    """
    assert len(puzzle) == 81
    
    return {key : ( '123456789' if value =='.' and replace else value) for key,value in zip(boxes,puzzle)}