import itertools
from typing import Any, Dict, List, Optional, Sequence, Text, Tuple
from axelrod.action import Action
from axelrod.evolvable_player import (
    EvolvablePlayer,
    InsufficientParametersError,
    copy_lists,
)
from axelrod.player import Player
lIIllIIIlIIl, lIIIlIIllIIII = Action.C, Action.D
lIllIIlIlIIIlllI = (lIIllIIIlIIl, lIIIlIIllIIII)
IllIllIll = Tuple[int, Action, int, Action]
class IlIIlIIIIIllIIIllIl(Player):
    lIIIIlIIIlIlIl = "strategy"
    IllIlIIllllIIl: Dict[Text, Any] = {
        "memory_depth": 1,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(
        llIlIIIIIIIlIIlIlII,
        IllIIlIIlIIIIlllI: Tuple[IllIllIll, ...] = ((1, lIIllIIIlIIl, 1, lIIllIIIlIIl), (1, lIIIlIIllIIII, 1, lIIIlIIllIIII)),
        llIIIlIIllIIll: int = 1,
        IllllllI: Action = lIIllIIIlIIl,
    ) -> None:
        Player.__init__(llIlIIIIIIIlIIlIlII)
        llIlIIIIIIIlIIlIlII.llIIIlIIllIIll = llIIIlIIllIIll
        llIlIIIIIIIlIIlIlII.IllllllI = IllllllI
        llIlIIIIIIIlIIlIlII.IIIIlIlIIIIII = SimpleFSM(IllIIlIIlIIIIlllI, llIIIlIIllIIll)
    def IIlIllllIlIIlIll(llIlIIIIIIIlIIlIlII, lllllIIIlIIlIII: Player) -> Action:
        if len(llIlIIIIIIIlIIlIlII.history) == 0:
            return llIlIIIIIIIlIIlIlII.IllllllI
        else:
            return llIlIIIIIIIlIIlIlII.IIIIlIlIIIIII.move(lllllIIIlIIlIII.history[-1])
class lIlIIIIlllIII(IlIIlIIIIIllIIIllIl):
    lIIIIlIIIlIlIl = "strategy"
    IllIlIIllllIIl = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(llIlIIIIIIIlIIlIlII) -> None:
        IllIIlIIlIIIIlllI = ((1, lIIllIIIlIIl, 1, lIIllIIIlIIl), (1, lIIIlIIllIIII, 2, lIIIlIIllIIII), (2, lIIllIIIlIIl, 1, lIIIlIIllIIII), (2, lIIIlIIllIIII, 1, lIIIlIIllIIII))
        super().__init__(
            IllIIlIIlIIIIlllI=IllIIlIIlIIIIlllI, llIIIlIIllIIll=1, IllllllI=lIIllIIIlIIl
        )