In this task, you need to reverse all words of a given length in the sentence. The number of letters in a word determine its length. For example, the length of the word "apple" is 5.

Sentence: 'a dog curled up sleeping on a bed with pillows'. Reverse all words of length '6' in the given sentence.
a dog delruc up sleeping on a bed with pillows

Sentence: 'a shirtless man lays on a bed and smiles'. Reverse all words of length '9' in the given sentence.
a sseltrihs man lays on a bed and smiles

Sentence: 'a small penguin sitting on top of a cake'. Reverse all words of length '4' in the given sentence.

a small penguin sitting on top of a ekac