from typing import List, Optional
from axelrod.action import Action
from axelrod.player import Player
llllIIlllIlIIII, lIlllIIIIIIIlIlIll = Action.C, Action.D
class lIlllIlIIlIIIlIlI(Player):
    lllIllIlllIlIll = "strategy"
    IlIIlllllIIIlIIllIIl = {
        "memory_depth": float("inf"),  
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(IlIIlIIIl, IIlIIlIlIlIl: Optional[List[Action]] = None) -> None:
        super().__init__()
        if not IIlIIlIlIlIl:
            IIlIIlIlIlIl = [llllIIlllIlIIII] * 6 + [lIlllIIIIIIIlIlIll] * 5
        IlIIlIIIl.IIlIIlIlIlIl = IIlIIlIlIlIl
        IlIIlIIIl.IIIlIIlllIlIlIIlIl = {llllIIlllIlIIII: 0, lIlllIIIIIIIlIlIll: 0}
    def IlIlIIlIIIIIl(IlIIlIIIl, llIIIlIIIIIIlll: Player):
        IIIIIlIIlIlIlll = IlIIlIIIl.match_attributes["game"]
        if len(IlIIlIIIl.history):
            IlIIIIIIIllIIlI = (IlIIlIIIl.history[-1], llIIIlIIIIIIlll.history[-1])
            IIIlIIlllIlIlIIlIl = IIIIIlIIlIlIlll.score(IlIIIIIIIllIIlI)
            IlIIlIIIl.IIIlIIlllIlIlIIlIl[IlIIIIIIIllIIlI[0]] += IIIlIIlllIlIlIIlIl[0]
    def IlIIlIlIIllIIIIIIlII(IlIIlIIIl, llIIIlIIIIIIlll: Player) -> Action:
        IlIIlIIIl.IlIlIIlIIIIIl(llIIIlIIIIIIlll)
        llIIllIllllllIIlllI = len(IlIIlIIIl.history)
        if llIIllIllllllIIlllI < len(IlIIlIIIl.IIlIIlIlIlIl):
            return IlIIlIIIl.IIlIIlIlIlIl[llIIllIllllllIIlllI]
        if IlIIlIIIl.IIIlIIlllIlIlIIlIl[llllIIlllIlIIII] > IlIIlIIIl.IIIlIIlllIlIlIIlIl[lIlllIIIIIIIlIlIll]:
            return llllIIlllIlIIII
        return lIlllIIIIIIIlIlIll