#C2862. Reverse Long Words

    ID: 46225 Type: Default 1000ms 256MiB

Reverse Long Words

Reverse Long Words

Given a sentence, reverse every word that has \(\geq 5\) letters. Words in the sentence are separated by spaces. If a word is shorter than five letters, it remains unchanged. You are required to read the sentence from standard input and output the processed sentence to standard output.

Note: Reversing a word means that the characters appear in reverse order. For instance, a word \( w = \texttt{abcde} \) becomes \( \texttt{edcba} \).

inputFormat

The input consists of a single line containing a sentence. The sentence may be empty and words are separated by spaces.

outputFormat

Output the modified sentence where every word with five or more letters is reversed. The output should be printed on a single line.

## sample
Welcome to the coding challenge
emocleW to the gnidoc egnellahc