كتاب التوبة
50  
The Book of Repentance
(7)
Chapter: The Words Of Allah The Most High: "Verily, The Good Deeds Remove The Evil Deeds"
(7)
Sahih Muslim 2763 c

This hadith has been narrated on the authority of Sulaiman Taimi with the same chain of transmitters that a person had taken liberty with a woman less than fomication. He came to 'Umar b. Khattab and he took it to be a serious offence. Then he came to Abu Bakr and he also took it to be a serious offence. Then he came the Allahs Apostle (ﷺ) and he made a mention of this to him. The rest of the hadith is the same.

حَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا جَرِيرٌ، عَنْ سُلَيْمَانَ التَّيْمِيِّ، بِهَذَا الإِسْنَادِ قَالَ أَصَابَ رَجُلٌ مِنِ امْرَأَةٍ شَيْئًا دُونَ الْفَاحِشَةِ فَأَتَى عُمَرَ بْنَ الْخَطَّابِ فَعَظَّمَ عَلَيْهِ ثُمَّ أَتَى أَبَا بَكْرٍ فَعَظَّمَ عَلَيْهِ ثُمَّ أَتَى النَّبِيَّ صلى الله عليه وسلم فَذَكَرَ بِمِثْلِ حَدِيثِ يَزِيدَ وَالْمُعْتَمِرِ ‏.‏
Reference : Sahih Muslim 2763c
In-book reference : Book 50, Hadith 49
USC-MSA web (English) reference : Book 37, Hadith 6657
  (deprecated numbering scheme)