def base_to_pair_rules(base_rules: dict) -> dict:
    """For dictionary of base rules, like {'CH': 'B', 'HH': 'N'} return a dictionary of pair rules. These have same
    keys as base rules, but the value is list of pairs.
    For example, {'CH': 'B''} parm returns {'CH': ['CB', 'BH']}"""
    pair_rules = {}
    for pair in base_rules:
        new_element = base_rules[pair]
        pair_rules[pair] = [pair[0] + new_element, new_element + pair[1]]
    return pair_rules