Given a String of length N reverse each word in it. Words are separated by dots.
Input:
The first line contains T denoting the number of testcases. Then follows description of testcases. Each case contains a string containing dots and characters.
Output:
For each test case, output a String in single line containing the reversed words of the given String.
Constraints:
1<=T<=10
1<=Length of String<=2000
Example:
Input:
2
i.like.this.program.very.much
pqr.mno
Output:
i.ekil.siht.margorp.yrev.hcum
rqp.onm
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.
codersanjeev | 66 |
snow_den_ | 60 |
BoggavarapuRamSaranSaiSrinivasGupta | 60 |
rajupraaa1234 | 53 |
SUZAKU | 49 |
mr_kksparrow | 433 |
manvirag982 | 258 |
snow_den_ | 232 |
arpit_anshuman | 228 |
SoumyaKaushik | 205 |
blackshadows | 5331 |
Ibrahim Nash | 5219 |
akhayrutdinov | 5111 |
mb1973 | 4929 |
Quandray | 4567 |