def parse_pair_instructions(text: str) -> dict[str, str]:
    """
    Parses the pair instructions from `text` and returns
    them as a dictionary of the pair to look for mapped
    to the value needed to put between them.
    """
    pairs = text.strip().split("\n\n")[-1].splitlines()

    keys = [pair.split(" -> ")[0] for pair in pairs]
    vals = [pair.split(" -> ")[1] for pair in pairs]

    return {k: v for k, v in zip(keys, vals)}