The best rows for men are the first rows, and the worst ones the last ones, and the best rows for women are the last ones and the worst ones for them are the first ones. (Using translation from Muslim 440a)
عَنِ النَّبِيِّ ﷺ قَالَ «خَيْرُ صُفُوفِ الرِّجَالِ أَوَّلُهَا وَشَرُّهَا آخِرُهَا وَخَيْرُ صُفُوفِ النِّسَاءِ آخِرُهَا وَشَرُّهَا أَوَّلُهَا»