#C13732. Reverse Words in Sentence

    ID: 43303 Type: Default 1000ms 256MiB

Reverse Words in Sentence

Reverse Words in Sentence

In this problem, you are given a sentence where each word may have attached punctuation marks. Your task is to reverse the alphabetical characters in each word while keeping the positions of any punctuation marks unchanged. For example, in the word hello,, the letters h-e-l-l-o are reversed to o-l-l-e-h, while the comma remains at the end, resulting in olleh,.

The reversal should be applied independently to each word, and the order of the words in the sentence must remain the same.

Note: Non-alphabet characters (such as digits and punctuation) are not moved from their positions.

inputFormat

The input consists of a single line containing the sentence.

outputFormat

Output a single line containing the sentence with each word processed so that its alphabetical characters are reversed in order while all non-alphabetical characters remain in their original positions.

## sample