Jami` at-Tirmidhi, Book 40, Hadith 20 (Tirmidhi 2695)

Narrated Abu Hurairah:

that the Messenger of Allah (ﷺ) said: "The adulterer is not a believer while he is committing adultery, and the thief is not a believer while he is stealing, but there is a chance for repentance; (if he repents, Allah will accept the repentance)."