Valmiki Ramayana Aranya Kanda Sarga 32 Shloka 17
Original Shlokaदशवर्षसहस्राणि तपस्तप्वा महावने। पुरा स्वयंभुवे धीरश्शिरांस्युपजहार यः।।3.32.17।।
1 source checked for this shloka
धीरः steadfast, यः who, पुरा in the past, महावने in a dense forest, दशवर्षसहस्राणि ten thousand years, तपः penance, तप्त्वा after performing, स्वयंभुवे to the Creator, शिरांसि heads, उपजहार offered.
This steadfast Ravana who had in the past performed penance for ten thousand years in a dense forest offered his heads to the selfborn Brahma.