The Messenger of Allah ﷺ would seek forgiveness for the first row three times and for the second row once.
حدثنا يحيى بن سعيد ووكيع قالا حدثنا هشام قال حدثنا يحيى بن أبي كثير عن محمد بن إبراهيم عن خالد بن معدان
أن رسول الله ﷺ كان يستغفر للصف المقدم ثلاثا وللثاني مرة
Its isnad is sahih. Muhammad bin Ibrahim is Harith Taymi, the well-known trustworthy narrator. Nasai narrated the hadith in 1/92, number 817, in the book of Leadership in Prayer, concerning the excellence of the first row over the second, and Ibn Majah in 1/318, number 996, and with a similar wording in Tirmidhi in 1/436, number 224, in the book of Prayer, concerning what has been said about the excellence of the first row, though he did not mention an isnad but said, "It has been narrated." It is also found in Tabarani, 8/256, number 639.