# Player Config ID: huggingface_DeepSeek-V3-0324_PayoffMaximizer_B (as Player B)
# Meta-Round: 2
# Experiment: PMxPM, Run: 3
# API: huggingface, Model: deepseek-ai/DeepSeek-V3-0324
# Based on textual strategy: huggingface_DeepSeek-V3-0324_PayoffMaximizer_B_MR2_strategy.txt
# LLM Suggested Fallback: Not Provided

def harmonious_illusion(my_history: list, opp_history: list, opponent_program_code: str) -> str:
    if not my_history:
        return "C"
    
    current_round = len(my_history) + 1
    always_c = "return 'C'" in opponent_program_code or "return 'c'" in opponent_program_code
    always_d = "return 'D'" in opponent_program_code or "return 'd'" in opponent_program_code
    
    if always_c:
        return "D"
    if always_d:
        return "D"
    
    if current_round >= 10:
        return "D"
    if current_round == 9 and "D" in opp_history[-3:]:
        return "D"
    
    if random.random() < 0.1:
        return "D"
    
    if opp_history[-1] == "D":
        return "D"
    else:
        return "C"