Valmiki Ramayana Sundara Kanda Sarga 3 Shloka 42
Original Shlokaततस्तु हनुमान् प्राज्ञस्तां दृष्ट्वा विनिपातिताम्।।5.3.42।। कृपां चकार तेजस्वी मन्यमानः स्त्रियं तु ताम्।
1 source checked for this shloka
ततः then, प्राज्ञः wise, तेजस्वी brilliaint, हनुमान् Hanuman, विनिपातिताम् fallen woman, ताम् her, दृष्ट्वा after seeing, ताम् her, स्त्रियम् is a woman, मन्यमानः thinking in the mind, कृपाम् compassion, चकार showed.
Wise and brilliant Hanuman, seeing the deity fallen down, left her (without killing her) out of compassion, thinking that she is a woman, after all.