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
IllIlIIIIlllIIIlIIl, IlIIIlllllIIlIl = Action.C, Action.D
lIIIIlIlIl = (IllIlIIIIlllIIIlIIl, IlIIIlllllIIlIl)
lllllIIllIllllIlI = Tuple[int, Action, int, Action]
class lIlllllIIllII(Player):
    IlIlIlllIlIIIIIII = "strategy"
    lIIlIlIIllIIIIlIIIII: Dict[Text, Any] = {
        "memory_depth": 1,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(
        lIIIIIII,
        llIIlIIIlIIllIIllII: Tuple[lllllIIllIllllIlI, ...] = ((1, IllIlIIIIlllIIIlIIl, 1, IllIlIIIIlllIIIlIIl), (1, IlIIIlllllIIlIl, 1, IlIIIlllllIIlIl)),
        llIlIIIIlIlllIlll: int = 1,
        llllIIlIlIlIII: Action = IllIlIIIIlllIIIlIIl,
    ) -> None:
        Player.__init__(lIIIIIII)
        lIIIIIII.llIlIIIIlIlllIlll = llIlIIIIlIlllIlll
        lIIIIIII.llllIIlIlIlIII = llllIIlIlIlIII
        lIIIIIII.lllIIIlIIl = SimpleFSM(llIIlIIIlIIllIIllII, llIlIIIIlIlllIlll)
    def llIIlIllIIlllllIIIII(lIIIIIII, IllIIlllllIl: Player) -> Action:
        if len(lIIIIIII.history) == 0:
            return lIIIIIII.llllIIlIlIlIII
        else:
            return lIIIIIII.lllIIIlIIl.move(IllIIlllllIl.history[-1])
class llIIlIIIll(lIlllllIIllII):
    IlIlIlllIlIIIIIII = "strategy"
    lIIlIlIIllIIIIlIIIII = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(lIIIIIII) -> None:
        llIIlIIIlIIllIIllII = ((1, IllIlIIIIlllIIIlIIl, 1, IllIlIIIIlllIIIlIIl), (1, IlIIIlllllIIlIl, 2, IllIlIIIIlllIIIlIIl), (2, IllIlIIIIlllIIIlIIl, 1, IlIIIlllllIIlIl), (2, IlIIIlllllIIlIl, 1, IllIlIIIIlllIIIlIIl))
        super().__init__(
            llIIlIIIlIIllIIllII=llIIlIIIlIIllIIllII, llIlIIIIlIlllIlll=1, llllIIlIlIlIII=IllIlIIIIlllIIIlIIl
        )