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.

[EX Q]: Sentence: 'a birthday cake cut in different pieces sitting on a tray at a table'. Reverse all words of length '1' in the given sentence.
[EX A]: a birthday cake cut in different pieces sitting on a tray at a table

[EX Q]: Sentence: 'a man holding a device in both of his hand'. Reverse all words of length '7' in the given sentence.
[EX A]: a man gnidloh a device in both of his hand

[EX Q]: Sentence: 'a bearded man wearing a tie and a baseball cap'. Reverse all words of length '7' in the given sentence.
[EX A]:
a dedraeb man gniraew a tie and a baseball cap