from axelrod import Player
from axelrod.action import Action
lIlIllIlllIlllIllI, IIlllIII = Action.C, Action.D
class llIIIllllIlIIIIlllll(Player):
    IIlIIIlIlIllII = "strategy"
    lIlIIIlllIIIlIlII = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    @staticmethod
    def llIlllIlIIIlIllIl(IIlIlIIlllllllIllIll: Player) -> Action:
        if len(IIlIlIIlllllllIllIll.history) <= 10:
            return lIlIllIlllIlllIllI
        IIIIlIllllllIIIlII = IIlIlIIlllllllIllIll.history[-10:]
        llIllIIlIIllIlII = IIIIlIllllllIIIlII.count(lIlIllIlllIlllIllI)
        IlllIlIlllIIIl = IIIIlIllllllIIIlII.count(IIlllIII)
        if llIllIIlIIllIlII - IlllIlIlllIIIl >= 3:
            return lIlIllIlllIlllIllI
        elif IlllIlIlllIIIl - llIllIIlIIllIlII >= 3:
            return IIlllIII
        else:
            return IIlIlIIlllllllIllIll.history[-1]