from typing import List, Optional
from axelrod.action import Action
from axelrod.player import Player
IllIIllll = List[float]
IIlIlllIlIIlIlIlllII, IIllllIlIllIllI = Action.C, Action.D
class lIlIlIlIIlIlIllIII(Player):
    llIlIllllllllIIlllll = "strategy"
    llIIIlIIIlllIlIIlIIl = {
        "stochastic": False,
        "memory_depth": float("inf"),  
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def lllIIlIlIIIIlIIII(lIlIIIIIllllIlIl, lllIIIlIIlIIIlII: Player) -> Action:
        IIIIIIIllIII = len(lIlIIIIIllllIlIl.history)
        if IIIIIIIllIII == 0:
            return IIllllIlIllIllI
        if IIIIIIIllIII == 1:
            return IIllllIlIllIllI
        if IIIIIIIllIII == 2:
            return IIlIlllIlIIlIlIlllII
        if IIIIIIIllIII == 3:
            return IIlIlllIlIIlIlIlllII
        if IIIIIIIllIII > 3:
            if lllIIIlIIlIIIlII.history[1:3] == [IIlIlllIlIIlIlIlllII, IIlIlllIlIIlIlIlllII]:
                return IIllllIlIllIllI
            else:
                return IIllllIlIllIllI if lllIIIlIIlIIIlII.history[-1:] == [IIllllIlIllIllI] else IIlIlllIlIIlIlIlllII