# Generated Python Strategy for: Qwen-32B (Qwen_32B_InitialAgent)
# LLM API: huggingface, Model: Qwen/Qwen2.5-32B-Instruct
# Based on: Qwen_32B_InitialAgent_strategy.txt
# Effective Fallback: C

def Qwen_32B_InitialAgent(my_history, opp_history, opponent_program_code):
    if len(my_history) < 2:
        return "C"
    try:
        code_analysis = re.search(r'(tit\s?for\s?tat|always\s?cooperate|always\s?defect)', opponent_program_code, re.IGNORECASE)
        if code_analysis:
            if 'always_defect' in code_analysis.group(0).lower():
                return "D"
            elif 'tit_for_tat' in code_analysis.group(0).lower() or 'always_cooperate' in code_analysis.group(0).lower():
                return "C"
    except:
        pass
    opp_cooperate_count = collections.Counter(opp_history)['C']
    if opp_cooperate_count > len(opp_history) / 2:
        return "C"
    else:
        if len(my_history) % 3 == 0:
            return "D"
        else:
            return opp_history[-1] if opp_history else "C"