Abu Hurairah (May Allah be pleased with him) reported: Messenger of Allah (PBUH) said,"A rider should greet a pedestrian; a pedestrian should greet one who is sitting; and a small group should greet a large group (of people)."[Al-Bukhari and Muslim].
The narration in Al-Bukhari adds: Messenger of Allah (PBUH) said, "The young should greet the elderly."
The greeting of As-Salamu Alaikum should be uttered according to the prescribed way. It is the situations under reference and not the grades which will be taken into consideration in this respect.