from axelrod.action import Action, actions_to_str
from axelrod.player import Player
from axelrod.strategy_transformers import (
    FinalTransformer,
    TrackHistoryTransformer,
)
llllllIllIIllII, llllIlllll = Action.C, Action.D
class lIllIIllI(Player):
    IIIlllIll = "strategy"
    IlIIIlIlIllIlIIIIl = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(IIIlIlII) -> None:
        super().__init__()
        IIIlIlII.llIlIlII = False
        IIIlIlII.lIlIIIlIllllllIll = False
        IIIlIlII.lIIllIIIIlIIIllIll = 0
        IIIlIlII.IIIIIlIlIIIlIIlIllI = 0
    def IlllIIlIlI(IIIlIlII, llIlllIlIlIllIl: Player) -> Action:
        if IIIlIlII.llIlIlII:
            IIIlIlII.llIlIlII = False
            return llllllIllIIllII
        if IIIlIlII.lIlIIIlIllllllIll:
            if IIIlIlII.lIIllIIIIlIIIllIll < IIIlIlII.IIIIIlIlIIIlIIlIllI:
                IIIlIlII.lIIllIIIIlIIIllIll += 1
                return llllIlllll
            else:
                IIIlIlII.llIlIlII = True
                IIIlIlII.lIlIIIlIllllllIll = False
                IIIlIlII.lIIllIIIIlIIIllIll = 0
                return llllllIllIIllII
        if llllIlllll in llIlllIlIlIllIl.history[-1:]:
            IIIlIlII.lIlIIIlIllllllIll = True
            IIIlIlII.lIIllIIIIlIIIllIll += 1
            IIIlIlII.IIIIIlIlIIIlIIlIllI += 1
            return llllIlllll
        return llllllIllIIllII