Valmiki Ramayana Kishkindha Kanda Sarga 18 Shloka 20
Original Shlokaतद्व्यतीतस्य ते धर्मात्कामवृत्तस्य वानर। भ्रातृभार्यावमर्शेऽस्मिन्दण्डोऽयं प्रतिपादितः4.18.20।।
1 source checked for this shloka
वानर monkey, तत् thus, धर्मात् from morality, व्यतीतस्य trespassing, कामवृत्तस्य for sensual pleasure, ते to you, अस्मिन् भ्रातृभार्यावमर्शे sinning against brother's wife, अयम् this, दण्डः punishment, प्रतिपादितः was justified.
'O monkey since you have violated morality by sinning against your brother's wife this punishment is justified.