Valmiki Ramayana Ayodhya Kanda Sarga 55 Shloka 29
Original Shlokaगच्छतोऽस्तु तयोर्मध्ये बभूव जनकात्मजा। मातङ्गयोर्मध्यगता शुभा नागवधूरिव।।2.55.29।।
1 source checked for this shloka
गच्छतोः going like that, तयोः of both, मध्यगता moving in the middle, जनकात्मजा daughter of Janaka, मातङ्गयोः of two male elephants, मध्यगता in between, शुभा auspicious, नागवधूरिव like a female elephant, बभूव remained.
The daughter of Janaka walked between them like a sheelephant between two males.