#K50952. Bob's Text Transformation

    ID: 28978 Type: Default 1000ms 256MiB

Bob's Text Transformation

Bob's Text Transformation

This problem requires you to transform a given text string following Bob's unique texting style. In this style, every odd word (i.e. the 1st, 3rd, etc.) is converted to uppercase, while every even word (i.e. the 2nd, 4th, etc.) is converted to lowercase. All spaces and punctuation must be preserved exactly as in the input.

For example, given the input "Hello world!", the output should be "HELLO world!". The first word "Hello" becomes uppercase while the second word "world!" remains in lowercase.

Note: A word is defined as a consecutive sequence of non-space characters. Be careful to maintain the original spacing, including multiple consecutive spaces and leading/trailing spaces.

inputFormat

The input consists of a single line containing a text string. The string may include letters, punctuation, and multiple consecutive spaces.

outputFormat

Output the transformed text string following Bob's texting style. Every odd word (positions 1, 3, 5, ...) should be in uppercase, and every even word (positions 2, 4, 6, ...) should be in lowercase. The spacing must remain identical to the input.## sample

Hello world!
HELLO world!