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: 'an old traditional pirate ship in modern city'. Reverse all words of length '3' in the given sentence.

SOLUTION: an dlo traditional pirate ship in modern city

PROBLEM: Sentence: 'a traffic light with road instructions directs traffic'. Reverse all words of length '4' in the given sentence.

SOLUTION: a traffic light htiw daor instructions directs traffic

PROBLEM: Sentence: 'a baseball pitcher pitching a ball during a game'. Reverse all words of length '8' in the given sentence.

SOLUTION:
a llabesab pitcher gnihctip a ball during a game