Abu Hurairah (May Allah bepleased with him) reported:
The Prophet (ﷺ) said, "When a slave-girl commits fornication and this fact of fornication has become evident, she must be given the penalty of (fifty) lashes without hurling reproaches at her; if she does it again, she must be given the penalty but she should not be rebuked. If she does it for the third time, he should sell her, even for a rope woven from hair (i.e., something worthless)".[Al-Bukhari and Muslim].
Arabic/English book reference: Book 1, Hadith 242