from axelrod.action import Action, actions_to_str
from axelrod.player import Player
from axelrod.strategy_transformers import (
    FinalTransformer,
    TrackHistoryTransformer,
)
llllIlIlIlllllI, lIIIlIIIllIIlIIllll = Action.C, Action.D
class lllIIIIllII(Player):
    IIllIlIIIIIllllll = "strategy"
    IlllllII = {
        "memory_depth": float("inf"),
        "stochastic": False,
        "long_run_time": False,
        "inspects_source": False,
        "manipulates_source": False,
        "manipulates_state": False,
    }
    def __init__(lIIllIlIIlIIIIlllII):
        super().__init__()
        lIIllIlIIlIIIIlllII.IllllIIIIllIIlI = False
    def llIIIlIIIl(lIIllIlIIlIIIIlllII, llllIIlIl: Player) -> Action:
        if not lIIllIlIIlIIIIlllII.history:
            return llllIlIlIlllllI
        if not (lIIllIlIIlIIIIlllII.IllllIIIIllIIlI) and llllIIlIl.defections >= 5:
            lIIllIlIIlIIIIlllII.IllllIIIIllIIlI = True
        if lIIllIlIIlIIIIlllII.IllllIIIIllIIlI:
            return lIIIlIIIllIIlIIllll
        return llllIIlIl.history[-1]