from typing import List, Optional, Tuple
from axelrod._strategy_utils import detect_cycle
from axelrod.action import Action
from axelrod.player import Player
IIIIIIIIlIIIllIlI, IIIIIllll = Action.C, Action.D
def IlIllIlIlII(llIIIIlIIlIll: List[Action]) -> bool:
    for IlIllIIlIIIIlIlIII in range(len(llIIIIlIIlIll) - 1):
        if llIIIIlIIlIll[IlIllIIlIIIIlIlIII] == llIIIIlIIlIll[IlIllIIlIIIIlIlIII + 1]:
            return False
    return True
class lIIlIIlIIIlllIIll(Player):
    lIlllIllIIIIIlIIIlI = "strategy"
    IIllIIIIIIlII = {
        "memory_depth": float("inf"),  
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(IllIllIllIllllIl) -> None:
        super().__init__()
        IllIllIllIllllIl.llIIIIIIlIlIIlIl = None  
    def IllllllIlllIIllIIIll(IllIllIllIllllIl, IIlIIlll: Player) -> Action:
        if IllIllIllIllllIl.llIIIIIIlIlIIlIl:
            return IIIIIllll
        llIIIIIIlIlIIlIl = detect_cycle(IIlIIlll.llIIIIlIIlIll, min_size=3)
        if llIIIIIIlIlIIlIl:
            if len(set(llIIIIIIlIlIIlIl)) > 1:
                IllIllIllIllllIl.llIIIIIIlIlIIlIl = llIIIIIIlIlIIlIl
                return IIIIIllll
        return IIIIIIIIlIIIllIlI