Muhammad, peace be upon him, said:
A prostitute was forgiven by Allah,
because, passing by a panting dog near a well
and seeing that the dog was about to die of thirst,
she took off her shoe, and tying it with her head-cover
she drew out some water for it.
So, Allah forgave her because of that.
O Son of Adam, so long as you call upon Me and ask of Me, I shall forgive you for what you have done, and I shall not mind. O Son of Adam, were your sins to reach the clouds of the sky and were you then to ask forgiveness of Me, I would forgive you. O Son of Adam, were you to come to Me with sins as great as the earth, and were you then to face Me ascribing no partners to Me, I would bring you forgiveness nearly as great as it. (Hadith Qudsi)