How to learn from difficult times