Valmiki Ramayana Aranya Kanda Sarga 17 Shloka 5
Original Shlokaतदाऽऽसीनस्य रामस्य कथासंसक्तचेतसः। तं देशं राक्षसी काचिदाजगाम यदृच्छया।।3.17.5।।
1 source checked for this shloka
रामस्य Rama's, कथासंसक्तचेतसः engrossed in conversation, तथा like that, आसीनस्य while he was sitting, काचित् one, राक्षसी demoness, यदृच्छया by chance, तं देशम् to that place, आजगाम came.
While Rama was thus seated, engrossed in conversation, there incidentally appeared a demoness.