Hebrews 12:10–11

10 For they disciplined us for a short time as it seemed best to them, but he disciplines us for our good, that we may share his holiness. 11 For the moment all discipline seems painful rather than pleasant, but later it yields the peaceful fruit of righteousness to those who have been trained by it.