Psalms 119:71

It is good for me that I have been afflicted; that I might learn thy statutes.