Jami` at-Tirmidhi, Book 2, Hadith 76 (Tirmidhi 224)
Abu Hurairah narrated that :
Allah's Messenger said: "The best rows for the men are the first of them, and the worst are the last of them. And the best rows for the women are the last of them, and the worst are the first of them."