def build_scoring_matrix(alphabet, diag_score, off_diag_score, dash_score):
    """
    Function to build a scoring matrix given the alphabet, diagonal score,
    off-diagonal score, and dash score. 
    Returns dictionary of dictionaries.
    """
    
    alphabet_dash = list(alphabet) + ["-"]
    score_matrix = {}
    
    for entry_row in alphabet_dash:
        matrix_row = {}
        for entry_column in alphabet_dash:
            if entry_row is "-" or entry_column is "-":
                matrix_row[entry_column] = dash_score
            elif entry_column is entry_row:
                matrix_row[entry_column] = diag_score
            else:
                matrix_row[entry_column] = off_diag_score
        
        score_matrix[entry_row] = matrix_row
        
    return score_matrix