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
IIIIIIlllIIllIIlII, llIIIllllIIII = Action.C, Action.D
IlIlIIllIlllIll = (IIIIIIlllIIllIIlII, llIIIllllIIII)
class lIIlIIIIlIIlIlIIIll(Player):
    lllllIIIlllllIIl = "strategy"
    IllIIlIIlIllIIll = {
        "memory_depth": 2,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(IllIIIIIlI, IIIIlllIIlIlIIII: str = "CCD") -> None:
        Player.__init__(IllIIIIIlI)
        IllIIIIIlI.IIIIlllIIlIlIIII = IIIIlllIIlIlIIII
        IllIIIIIlI.lIIIIIIIllllI(IIIIlllIIlIlIIII=IIIIlllIIlIlIIII)
    def lIIlIllIIl(IllIIIIIlI, lllIlllll: Player) -> Action:
        return next(IllIIIIIlI.lIllIlllIIlIllllIIII)
    def lIIIIIIIllllI(IllIIIIIlI, IIIIlllIIlIlIIII: str):
        IllIIIIIlI.IIIIlllIIlIlIIII = IIIIlllIIlIlIIII
        IllIIIIIlI.lIllIlllIIlIllllIIII = itertools.IIIIlllIIlIlIIII(str_to_actions(IllIIIIIlI.IIIIlllIIlIlIIII))
        IllIIIIIlI.IllIIlIIlIllIIll["memory_depth"] = len(IIIIlllIIlIlIIII) - 1
class IIlllIlII(lIIlIIIIlIIlIlIIIll):
    lllllIIIlllllIIl = "strategy"
    IllIIlIIlIllIIll = copy.copy(lIIlIIIIlIIlIlIIIll.IllIIlIIlIllIIll)
    IllIIlIIlIllIIll["memory_depth"] = 2
    def __init__(IllIIIIIlI) -> None:
        super().__init__(IIIIlllIIlIlIIII="DDC")