Sahih al-Bukhari, Book 78, Hadith 5 (Bukhari 5746)

Narrated Ibn `Umar:

Allah's Messenger (ﷺ) said, "While three persons were traveling, they were overtaken by rain and they took shelter in a cave in a mountain. A big rock fell from the mountain over the mouth of the cave and blocked it. They said to each other. 'Think of such good (righteous) deeds which, you did for Allah's sake only, and invoke Allah by giving reference to those deeds so that Allah may relieve you from your difficulty. one of them said, 'O Allah! I had my parents who were very old and I had small children for whose sake I used to work as a shepherd. When I returned to them at night and milked (the sheep), I used to start giving the milk to my parents first before giving to my children. And one day I went far away in search of a grazing place (for my sheep), and didn't return home till late at night and found that my parents had slept. I milked (my livestock) as usual and brought the milk vessel and stood at their heads, and I disliked to wake them up from their sleep, and I also disliked to give the milk to my children before my parents though my children were crying (from hunger) at my feet. So this state of mine and theirs continued till the day dawned. (O Allah!) If you considered that I had done that only for seeking Your pleasure, then please let there be an opening through which we can see the sky.' So Allah made for them an opening through which they could see the sky. Then the second person said, 'O Allah! I had a she-cousin whom I loved as much as a passionate man love a woman. I tried to seduce her but she refused till I paid her one-hundred Dinars So I worked...