Valmiki Ramayana Ayodhya Kanda Sarga 47 Shloka 15
Original Shlokaततो यथागतेनैव मार्गेण क्लान्तचेतसः। अयोध्यामागमन्सर्वे पुरीं व्यथितसज्जनाम्।।2.47.15।।
1 source checked for this shloka
ततः thereafter, सर्वे all of them, क्लान्तचेतसः with their minds, यथागतेनैव they had come, मार्गेण way, व्यथितसज्जनाम् with virtuous people grieving, अयोध्याम् to Ayodhya, पुरीम् city, आगमन् had come back.
Thereafter, all of them, the virtuous people grieving, their minds fatigued, returned to Ayodhya the same way they had come.