The Messenger of Allah ﷺ said, "The best of the men's rows is the front row and the worst is the back row. The worst of the women's rows is the front row and the best is the back row."
حدثنا عبد الصمد قال حدثنا عبد العزيز يعني ابن مسلم قال حدثنا سهيل بن أبي صالح عن أبيه
أن رسول الله ﷺ قال خير صفوف الرجال المقدم وشرها المؤخر وشر صفوف النساء المقدم وخيرها المؤخر
Its isnad is sahih. It was narrated by Muslim, Abu Dawud, Tirmidhi, Nasai, and Ibn Majah on the authority of Abu Hurairah. Tabarani narrated it in Al-Kabir on the authority of Abu Umama, and also on the authority of Ibn Abbas. Suyuti noted its being sahih in Jami Saghir.