from typing import List, Optional
from axelrod.action import Action
from axelrod.player import Player
lIIlIIllIIII = List[float]
lIIIIlIllIll, IIIIlIllIlIlIllll = Action.C, Action.D
class lIllIIIIIllIlI(Player):
    IllIIIlIlllIllI = "strategy"
    lIIllllIIl = {
        "stochastic": False,
        "memory_depth": float("inf"),  
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def llIIlllllI(IlllllIIIllllIIIIl, IIIIllIIlI: Player) -> Action:
        lIIIIIlIlIIlIII = len(IlllllIIIllllIIIIl.history)
        if lIIIIIlIlIIlIII == 0:
            return IIIIlIllIlIlIllll
        if lIIIIIlIlIIlIII == 1:
            return lIIIIlIllIll
        if lIIIIIlIlIIlIII == 2:
            return lIIIIlIllIll
        if lIIIIIlIlIIlIII > 2:
            if IIIIllIIlI.history[1:3] == [lIIIIlIllIll, lIIIIlIllIll]:
                return IIIIlIllIlIlIllll
            else:
                return IIIIlIllIlIlIllll if IIIIllIIlI.history[-1:] == [IIIIlIllIlIlIllll] else lIIIIlIllIll