from typing import List, Optional
from axelrod.action import Action
from axelrod.player import Player
IIIlIlIlIlIlIllIllIl = List[float]
lIlIIIIllIIIlllI, lIlIlIlIIlllIllIIll = Action.C, Action.D
class IlIlIllll(Player):
    llIIIIlIlIII = "strategy"
    IlllIIIIIlIlIlI = {
        "stochastic": False,
        "memory_depth": float("inf"),  
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def IIIlllIlIIIllIl(lIlIlIIlIIIII, lIIllllIlIl: Player) -> Action:
        IlIlIIIIlllI = len(lIlIlIIlIIIII.history)
        if IlIlIIIIlllI == 0:
            return lIlIlIlIIlllIllIIll
        if IlIlIIIIlllI == 1:
            return lIlIIIIllIIIlllI
        if IlIlIIIIlllI == 2:
            return lIlIIIIllIIIlllI
        if IlIlIIIIlllI > 2:
            if lIIllllIlIl.history[1:3] == [lIlIlIlIIlllIllIIll, lIlIIIIllIIIlllI]:
                return lIlIIIIllIIIlllI
            else:
                return lIlIlIlIIlllIllIIll if lIIllllIlIl.history[-1:] == [lIlIlIlIIlllIllIIll] else lIlIIIIllIIIlllI