#K84542. Reverse Words in a Sentence
Reverse Words in a Sentence
Reverse Words in a Sentence
You are given a number T which represents the number of test cases. For each test case, you are provided with a sentence. Your task is to reverse every word in the sentence individually while keeping the original order of the words. Additionally, the entire output must be in lowercase.
For example, given the sentence "Hello World", you should output "olleh dlrow".
The transformation for each word is defined by the formula: \[ \text{word}_{output} = \text{reverse}(\text{lower}(\text{word}_{input})) \]
Read the input from standard input and write your answer to standard output.
inputFormat
The first line contains an integer T, which is the number of test cases. Each of the following T lines contains a sentence. Each sentence consists of one or more words separated by spaces.
Input is read from standard input.
outputFormat
For each test case, output a single line that contains the sentence with each word reversed and converted to lowercase. The order of the words must remain the same as in the input.
Output is written to standard output.
## sample1
Hello World
olleh dlrow