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 cat has is sticking its head in the toilet'. Reverse all words of length '8' in the given sentence.
a cat has is gnikcits its head in the toilet

Sentence: 'a kitchen has a microwave an oven and a countertop'. Reverse all words of length '2' in the given sentence.
a kitchen has a microwave na oven and a countertop

Sentence: 'a cake shaped as a train has the number 4 on it'. Reverse all words of length '3' in the given sentence.

a cake shaped as a train sah eht number 4 on it