Hadithcore
Mishkat al-Masabih, 1111

Samura b. Jundub said:

God’s Messenger commanded that when there were three of us one should stand in front. Tirmidhi transmitted it.

عَن سَمُرَة بن جُنْدُب قَالَ: أَمَرَنَا رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا كُنَّا ثَلَاثَةً أَنْ يَتَقَدَّمَنَا أَحَدُنَا. رَوَاهُ التِّرْمِذِيّ

References1 variant
In-Book Reference
Book 4, Hadith 528