#K67812. Reverse Each Word in a String

    ID: 32726 Type: Default 1000ms 256MiB

Reverse Each Word in a String

Reverse Each Word in a String

Given a string containing words separated by spaces, your task is to output a modified string where each individual word is reversed while maintaining the original order of words. Formally, if a string \(s\) can be decomposed as \(s = w_1\ w_2\ \dots\ w_n\), then the output should be \(w_1^R\ w_2^R\ \dots\ w_n^R\), where \(w_i^R\) denotes the reversal of word \(w_i\).

For example, if the input is "Hello world!", the output should be "olleH !dlrow".

inputFormat

The input is given via standard input and consists of a single line containing a string \(s\). The string may include letters, digits, punctuation, and spaces.

outputFormat

Output a single line to standard output which is the string \(s\) with each word individually reversed, while preserving the original order of the words.

## sample
Hello
olleH