Second law of black hole mechanics