Under construction

Still being built. Things may change

Reverse Each Word

Interview

Time limit1sMemory limit128 MB

Summary
For each of T sentences, print the words in the same order with the letters inside every word reversed.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

Given a sentence, print it with every word reversed. Keep the words in their original order and reverse only the letters inside each word. Every word consists of English letters.

Input

The first line has the number of test cases TT. Each of the next TT lines holds one sentence.

A word is at most 2020 characters long and a sentence is at most 10001000 characters long. A single space separates one word from the next.

Output

For each test case, print the sentence with every word reversed, one sentence per line. Keep a single space between words.

Examples1

  1. Example 1

    Input
    2
    I am happy today
    We want to win the first prize
    
    Expected output
    I ma yppah yadot
    eW tnaw ot niw eht tsrif ezirp