Plato said this quote

The best is to do injustice without paying the penalty, the worst is to suffer it without being able to take revenge. Justice is a mean between these two extremes. People value it not because it is a good but because they are too weak to do injustice with impunity.