Mahāsaṅghika Vinaya
Bhikkhunī Pakiṇṇaka
Pakiṇṇaka 37
There are three reasons for which someone is no longer a bhikkhu. Which three? He decides to give up the training, there are valid reasons for the sangha to expel him, or he turns into a woman. These are called the three reasons for which someone is no longer a bhikkhu. (If she has turned into a woman,) she should be sent to a bhikkhunī monastery. She may not be in a concealed place together with the bhikkhunīs, and should stay apart. If she later turns back and acquires male genitals, he should return to the bhikkhu sangha. He’s still called fully ordained, and also keeps his previous seniority.