Complex sentence: When no male is available, in each school the largest female shifts sex to male, with male behavior occurring within several hours and sperm production occurring within ten days.
Split into simpler sentences: When no male is available, in each school the largest female shifts sex to male. If the final male disappears, changes to the largest female occur, with male behavior occurring within several hours and sperm production occurring within ten days.