TASK DEFINITION: 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.
PROBLEM: Sentence: 'a dog is sleeping on a boat in the water'. Reverse all words of length '2' in the given sentence.

SOLUTION: a dog si sleeping no a boat ni the water

PROBLEM: Sentence: 'a bird sits atop a post near a boat dock with large boats in the background'. Reverse all words of length '1' in the given sentence.

SOLUTION: a bird sits atop a post near a boat dock with large boats in the background

PROBLEM: Sentence: 'a group of men standing on a field playing a game of baseball'. Reverse all words of length '1' in the given sentence.

SOLUTION:
a group of men standing on a field playing a game of baseball