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
lIlllIllIIIl, lllIlIll = Action.C, Action.D
lIIIIIIlIIIIIIlIll = (lIlllIllIIIl, lllIlIll)
lIIIllllI = Tuple[int, Action, int, Action]
class IIlIIlllIll(Player):
    IIIllIlII = "strategy"
    llIllIlllIIIlIIIll: Dict[Text, Any] = {
        "memory_depth": 1,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(
        llIlIllIlIlIlIll,
        lllllIIIIlllIlIIII: Tuple[lIIIllllI, ...] = ((1, lIlllIllIIIl, 1, lIlllIllIIIl), (1, lllIlIll, 1, lllIlIll)),
        IIIIlIlIIllll: int = 1,
        IIlIIIIIIIlllIII: Action = lIlllIllIIIl,
    ) -> None:
        Player.__init__(llIlIllIlIlIlIll)
        llIlIllIlIlIlIll.IIIIlIlIIllll = IIIIlIlIIllll
        llIlIllIlIlIlIll.IIlIIIIIIIlllIII = IIlIIIIIIIlllIII
        llIlIllIlIlIlIll.llIIIlllI = SimpleFSM(lllllIIIIlllIlIIII, IIIIlIlIIllll)
    def llIIIlIIlIII(llIlIllIlIlIlIll, IIlllIlllIIIlll: Player) -> Action:
        if len(llIlIllIlIlIlIll.history) == 0:
            return llIlIllIlIlIlIll.IIlIIIIIIIlllIII
        else:
            return llIlIllIlIlIlIll.llIIIlllI.move(IIlllIlllIIIlll.history[-1])
class llIIIlllIllIlllI(IIlIIlllIll):
    IIIllIlII = "strategy"
    llIllIlllIIIlIIIll = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(llIlIllIlIlIlIll) -> None:
        lllllIIIIlllIlIIII = ((1, lIlllIllIIIl, 2, lIlllIllIIIl), (1, lllIlIll, 2, lIlllIllIIIl), (2, lIlllIllIIIl, 1, lIlllIllIIIl), (2, lllIlIll, 1, lllIlIll))
        super().__init__(
            lllllIIIIlllIlIIII=lllllIIIIlllIlIIII, IIIIlIlIIllll=1, IIlIIIIIIIlllIII=lllIlIll
        )