Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: "When they are three, they should all form one row; and when they are more than that, one of them should go forward ahead of them."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9352