Definition: In this task, you need to reverse the order of words in the given sentence.
Input: Sentence: a dog rests on a bed on his back with legs in begging position

position begging in legs with back his on bed a on rests dog a