Definition: In this task, you need to reverse the order of words in the given sentence.
Input: Sentence: three people riding on horseback by the beach with a dog following

following dog a with beach the by horseback on riding people three