from axelrod.action import Action
from axelrod.player import Player
lllllIIIIIlIIllllll, IIlIIlllIllIIIIllIIl = Action.C, Action.D
class lllIlIIIIlIll(Player):
    lIIIlIIIIlIlIIllI = "strategy"
    IIIIllIllllII = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    @staticmethod
    def lIlllllIIlIIlII(lIIlIIlIIllIlIlIlllI: Player) -> Action:
        lIlIIIIIllIIlIllll = len(lIIlIIlIIllIlIlIlllI.history)
        if lIlIIIIIllIIlIllll < 3:
            return lllllIIIIIlIIllllll
        llIIIIIIlI = lIIlIIlIIllIlIlIlllI.llIIIIIIlI
        IlIlllIlllIIlI = llIIIIIIlI / lIlIIIIIllIIlIllll
        if IlIlllIlllIIlI > 0.5:
            return lllllIIIIIlIIllllll
        elif IlIlllIlllIIlI < 0.5:
            return IIlIIlllIllIIIIllIIl
        else:
            return lIIlIIlIIllIlIlIlllI.history[-1]