Genomic Analysis Uncovers The Evolutionary Dynamics Of Sex Determining