#C13021. Reverse Each Word
Reverse Each Word
Reverse Each Word
Given a string, reverse the characters of each word while preserving the original order of the words. Each word is defined as a series of characters separated by spaces. Treat all characters, including punctuation and digits, as regular characters.
For example, if the input is hello world
, the output should be olleh dlrow
.
The mathematical operation performed on each word can be expressed as: \( \text{output}_i = \text{reverse}(\text{word}_i) \) for all words \( i \) in the string.
inputFormat
The input consists of a single line containing a string. The string may include spaces, punctuation, and numbers.
outputFormat
Output the string after reversing the characters of each word while preserving the original word order. The output should be printed to stdout.
## samplehello world
olleh dlrow
</p>