BISEXUAL THEORY. “This theory proposes a pair of alternative mechanisms, based on the movement of a frontier of B-function gene expression in either a basipetal or acropetal direction along male or female reproductive axes, respectively, in the pre-angiosperm lineage. As a result, the axis affected is proposed to have become bisexual, with female organs at its tip and male organs at its base. Carpels would then have evolved by the closure of megasporophylls in the apical region of the bisexual axis.”
https://academic.oup.com/jxb/article/57/10/2143/471376/An-evolutionary-perspective-on-the-regulation-of