from axelrod.action import Action
from axelrod.player import Player
IllIIlIIllIlIIIllI, llIIIIIllIIllIllIll = Action.C, Action.D
class llIlIIllIIl(Player):
    lIIllIIlIIlIll = "strategy"
    lllllIllIIIIIl = {
        "memory_depth": float("inf"),  
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(IIIIIIlIlIIlI) -> None:
        super().__init__()
        IIIIIIlIlIIlI.IllIIIIII = 1
        IIIIIIlIlIIlI.IllIllll = False
        IIIIIIlIlIIlI.llIIIIIIIlllIl = 1
    def lIIIIlIlIlIl(IIIIIIlIlIIlI, IllIlIIIlllllIlIIll: Player) -> Action:
        if IIIIIIlIlIIlI.llIIIIIIIlllIl >= IIIIIIlIlIIlI.IllIIIIII:
            IIIIIIlIlIIlI.llIIIIIIIlllIl = 0
            IIIIIIlIlIIlI.IllIllll = False
        if IIIIIIlIlIIlI.IllIllll:
            IIIIIIlIlIIlI.llIIIIIIIlllIl += 1
            return llIIIIIllIIllIllIll
        elif llIIIIIllIIllIllIll in IllIlIIIlllllIlIIll.history[-1:]:
            IIIIIIlIlIIlI.IllIIIIII = (IllIlIIIlllllIlIIll.cooperations * 20) // len(
                IllIlIIIlllllIlIIll.history
            )
            if IIIIIIlIlIIlI.IllIIIIII == 0:
                IIIIIIlIlIIlI.IllIIIIII += 1
            IIIIIIlIlIIlI.IllIllll = True
            return llIIIIIllIIllIllIll
        return IllIIlIIllIlIIIllI