from typing import List, Optional, Tuple
from axelrod._strategy_utils import detect_cycle
from axelrod.action import Action
from axelrod.player import Player
lIIlllIlllI, lIllIIllIIllIIl = Action.C, Action.D
def IllIlIlI(IIllllIlIIlIIIl: List[Action]) -> bool:
    for IIIlIllIlIlllI in range(len(IIllllIlIIlIIIl) - 1):
        if IIllllIlIIlIIIl[IIIlIllIlIlllI] == IIllllIlIIlIIIl[IIIlIllIlIlllI + 1]:
            return False
    return True
class IIlIlIlIIII(Player):
    llIlllIIIl = "strategy"
    IIlllIIIlIll = {
        "memory_depth": float("inf"),  
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def lllllllII(lIlIIlIIIlIlIIllIIl, llllIlIlIIIIlllIlI: Player) -> Action:
        if (
            len(lIlIIlIIIlIlIIllIIl.IIllllIlIIlIIIl) >= 4
            and len(llllIlIlIIIIlllIlI.IIllllIlIIlIIIl) == llllIlIlIIIIlllIlI.cooperations
        ):
            return lIllIIllIIllIIl
        return lIIlllIlllI