وَيَصُفُّ الرِّجَالُ، ثُمَّ الصِّبْيَانُ، ثُمَّ الْخَنَاثَى، ثُمَّ النِّسَاءُ.
Meaning: Men form the first row, then boys, then persons classically described as khuntha, then women.
This is the classical row order for a shared congregation. “Khuntha” is a historical legal term concerning ambiguity in sex classification, not a term of derision.