كتاب المقدمات
The Book of Miscellany
(51)
Chapter: Hope in Allah's Mercy
(51)
- باب الرجاء
Riyad as-Salihin 422
Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "By the One in Whose Hand my soul is, were you not to commit sins, Allah would replace you with a people who would commit sins and then seek forgiveness from Allah; and Allah would forgive them".

[Muslim].

وعنه قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ “والذي نفسي بيده لو لم تذنبوا، لذهب الله بكم، ولجاء بقوم يذنبون، فيستغفرون الله تعالى، فيغفر لهم” ‏(‏‏(‏رواه مسلم‏)‏‏)‏‏.‏
Reference : Riyad as-Salihin 422
In-book reference : Introduction, Hadith 422