import copy
import itertools
from typing import List, Optional, Tuple
from axelrod.action import Action, actions_to_str, str_to_actions
from axelrod.evolvable_player import (
    EvolvablePlayer,
    InsufficientParametersError,
    crossover_lists,
)
from axelrod.player import Player
llIllIIIIlIIIlII, llllIlIllIIIllIIIIIl = Action.C, Action.D
IIIIIlIllIlllIIlI = (llIllIIIIlIIIlII, llllIlIllIIIllIIIIIl)
class lIlIIlIIllIIlI(Player):
    lIIlIlllllIllIII = "strategy"
    IIlIIllIllIIIIlll = {
        "memory_depth": 2,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(IlIIlIllIlIlII, IIIlIIIIlII: str = "CCD") -> None:
        Player.__init__(IlIIlIllIlIlII)
        IlIIlIllIlIlII.IIIlIIIIlII = IIIlIIIIlII
        IlIIlIllIlIlII.lIlllIIlIlIlllI(IIIlIIIIlII=IIIlIIIIlII)
    def IlIIIlIlIll(IlIIlIllIlIlII, lIllIIllI: Player) -> Action:
        return next(IlIIlIllIlIlII.llIIIlIIIIIlI)
    def lIlllIIlIlIlllI(IlIIlIllIlIlII, IIIlIIIIlII: str):
        IlIIlIllIlIlII.IIIlIIIIlII = IIIlIIIIlII
        IlIIlIllIlIlII.llIIIlIIIIIlI = itertools.IIIlIIIIlII(str_to_actions(IlIIlIllIlIlII.IIIlIIIIlII))
        IlIIlIllIlIlII.IIlIIllIllIIIIlll["memory_depth"] = len(IIIlIIIIlII) - 1
class IllIlIII(lIlIIlIIllIIlI):
    lIIlIlllllIllIII = "strategy"
    IIlIIllIllIIIIlll = copy.copy(lIlIIlIIllIIlI.IIlIIllIllIIIIlll)
    IIlIIllIllIIIIlll["memory_depth"] = 3
    def __init__(IlIIlIllIlIlII) -> None:
        super().__init__(IIIlIIIIlII="CCCD")