#C14757. Reverse Words

    ID: 44441 Type: Default 1000ms 256MiB

Reverse Words

Reverse Words

Given a string s, reverse the characters in each word while preserving the whitespace and the original word order. For example, if s is "Let's take LeetCode contest", the expected output is "s'teL ekat edoCteeL tsetnoc". This problem tests your ability to manipulate strings and arrays, and your approach should handle typical edge cases such as empty strings and single-character words.

inputFormat

The input is provided via standard input and consists of a single line containing the string s. The string may include letters, whitespace, and punctuation.

outputFormat

The output should be written to standard output. It consists of a transformed string where each word has its characters reversed, but the original order of the words and the whitespace between them are preserved.

## sample
Let's take LeetCode contest
s'teL ekat edoCteeL tsetnoc