Psalms 94:12 (KJV)

Blessed is the man whom thou chastenest, O LORD, and teachest him out of thy law;