from axelrod.action import Action
from axelrod.player import Player
llllIIlIIllII, IIllIIIIll = Action.C, Action.D
class lllIllIl(Player):
    lIlIIIIIll = "strategy"
    IllIllllIIlIIIl = {
        "memory_depth": 5,
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def IlIIlllIlllIIlIll(IIIIllllllllIIlI, lllIIllIIlIlIlIlIIll: Player) -> Action:
        if len(IIIIllllllllIIlI.history) == 0:
            return llllIIlIIllII
        if len(IIIIllllllllIIlI.history) >= 5 and IIIIllllllllIIlI.history[-5:] == [llllIIlIIllII, llllIIlIIllII, llllIIlIIllII, llllIIlIIllII, llllIIlIIllII]:
            return IIllIIIIll
        elif len(IIIIllllllllIIlI.history) >= 5 and IIIIllllllllIIlI.history[-5:] == [IIllIIIIll, IIllIIIIll, IIllIIIIll, IIllIIIIll, IIllIIIIll]:
            return llllIIlIIllII
        else:
            return lllIIllIIlIlIlIlIIll.history[-1]