Shiva Purana
पार्थिवेशसमर्चातः पुनस्सोऽभूत्पुमान्वरः ॥ मासं स्त्री पुरुषो मासमेवं स्त्रीत्वं न्यवर्त्तत ॥ ४१ ॥
Thanks to the worship of the earthen image of Śiva, he became an excellent man again. By remaining a man for a month and a woman for a month, his womanhood disappeared.
english translation
pArthivezasamarcAtaH punasso'bhUtpumAnvaraH ॥ mAsaM strI puruSo mAsamevaM strItvaM nyavarttata ॥ 41 ॥
hk transliteration by Sanscript