Sunan an-Nasa'i, Hadith 820

It was narrated that Abu Hurairah said: "The Messenger of Allah said: 'The best rows for men are the front rows and the worst are the last, and the best rows for women are the back rows and the worst are those in the front."'

أَخْبَرَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، قَالَ حَدَّثَنَا جَرِيرٌ، عَنْ سُهَيْلٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ خَيْرُ صُفُوفِ الرِّجَالِ أَوَّلُهَا وَشَرُّهَا آخِرُهَا وَخَيْرُ صُفُوفِ النِّسَاءِ آخِرُهَا وَشَرُّهَا أَوَّلُهَا ‏" ‏ ‏.‏

sunnah.com