#C13490. Reverse Each Word

    ID: 43034 Type: Default 1000ms 256MiB

Reverse Each Word

Reverse Each Word

Given a sentence, reverse each word individually while preserving the original word order. In this problem, words are defined as sequences of non-space characters. Any extra spaces at the beginning, end, or between words should be ignored in the output.

For example, if the input is hello world, then the reversed word output will be olleh dlrow.

inputFormat

The input consists of a single line containing a sentence. The sentence may contain extra spaces and punctuation that are considered as parts of words.

outputFormat

Output a single line: the sentence with each word reversed, but the order of the words remains unchanged. Extra spaces should be removed in the output.

## sample
hello
olleh

</p>