Valmiki Ramayana Bala Kanda Sarga 38 Shloka 23
Original Shlokaतत: कालेन महता मतिस्समभिजायत।।1.38.23।। सगरस्य नरश्रेष्ठ यजेयमिति निश्चिता।
1 source checked for this shloka
नरश्रेष्ठ O Best among men, तत: afterwards, महता कालेन after a long time, सगरस्य Sagara's, यजेयम् I shall perform sacrifice, इति thus, निश्चिता firm, मति: decision, समभिजायत arose (in him).
O best among men after a long time, a thought came to the mind of Sagara to definitely perform a sacrifice.