from axelrod.action import Action
from axelrod.player import Player
IllIlllI, llllllIlII = Action.C, Action.D
class lllIIlIlIIlIlIlI(Player):
    IIIIIlllIIllIlIIl = "strategy"
    IIIIIllll = {
        "memory_depth": 5,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def lIIllIllIlI(IllIIlllIlI, IIllIlllIlIllIIllIl: Player) -> Action:
        if len(IllIIlllIlI.history) == 0:
            return IllIlllI
        if len(IllIIlllIlI.history) >= 5 and IllIIlllIlI.history[-5:] == [llllllIlII, llllllIlII, llllllIlII, llllllIlII, llllllIlII]:
            return llllllIlII
        else:
            return IIllIlllIlIllIIllIl.history[-1]