#K54357. Reverse Characters of Each Word
Reverse Characters of Each Word
Reverse Characters of Each Word
Given a sentence, reverse the characters of each individual word while preserving the original order of the words.
For instance, if the input is Hello World
, the output should be olleH dlroW
.
Your task is to implement a program that reads a single line from standard input and prints the sentence after reversing each word.
Note: If the sentence is empty, simply output an empty string.
inputFormat
The input consists of a single line containing a sentence. Words in the sentence are separated by spaces. The sentence can also be empty.
outputFormat
Output the sentence in which the characters of each word are reversed, while the word order remains the same.
## sampleHello World
olleH dlroW