from axelrod.action import Action, actions_to_str
from axelrod.player import Player
from axelrod.strategy_transformers import (
    FinalTransformer,
    TrackHistoryTransformer,
)
lIllIIIllIlIIII, IIIllIIlIlIlI = Action.C, Action.D
class IllllIIlIIlIIIII(Player):
    llIIlIIllllIll = "strategy"
    llllIIIIIIIllIl = {
        "memory_depth": 3,  
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    @staticmethod
    def lIIIlIllIIlIIIl(IlIIlllIlIIl: Player) -> Action:
        if not IlIIlllIlIIl.history:
            return lIllIIIllIlIIII
        llllIIlIIlIIllI = actions_to_str(IlIIlllIlIIl.history[-3:])
        if "DD" in llllIIlIIlIIllI:
            return IIIllIIlIlIlI
        return lIllIIIllIlIIII