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

Sentence: 'a dog lays next to a bag on a couch'. Reverse all words of length '4' in the given sentence.
a dog syal txen to a bag on a couch

Sentence: 'a sealed green bottle with a note in it'. Reverse all words of length '1' in the given sentence.

a sealed green bottle with a note in it