def strategy(self, opponent: Player) -> Action:
    if (not len(opponent.history)):
        return C
    elif (opponent.history[(- 1)] == D):
        if (self.history[(- 1)] == C):
            return D
        else:
            return C
    return self.history[(- 1)]
def strategy(self, opponent: Player) -> Action:
    if (not len(opponent.history)):
        return C
    elif (opponent.history[(- 1)] == D):
        if (self.history[(- 1)] == C):
            return D
        else:
            return C
    return self.history[(- 1)]