Task: Program Execution
Input (English): Sentence: a dog rests on a bed on his back with legs in begging position
Output (English): position begging in legs with back his on bed a on rests dog a