Sunan Abi Dawud, Book 2, Hadith 281 (Abu Dawud 671)

Narrated Anas ibn Malik:

The Prophet (ﷺ) said: Complete the front row, then the one that comes next, and if there is any incompleteness, let it be in the last row.