Learning lessons is often painful.