#B3674. Adjust Letter Case in Words

    ID: 11333 Type: Default 1000ms 256MiB

Adjust Letter Case in Words

Adjust Letter Case in Words

You are given a string \(S\) consisting of lowercase English letters and spaces. The string is composed of multiple words separated by a single space (with no leading or trailing spaces). For each word, you are required to adjust the case of its letters such that the odd-indexed letters (considering 1-indexing) are converted to uppercase and the even-indexed letters are converted to lowercase.

For example, for the word \(\texttt{apple}\):

  • The 1st letter transforms to \(A\).
  • The 2nd letter transforms to \(p\).
  • The 3rd letter transforms to \(P\).
  • The 4th letter transforms to \(l\).
  • The 5th letter transforms to \(E\).

Your task is to complete this transformation for every word present in the input string.

inputFormat

The input consists of a single line containing the string \(S\), which is made up only of lowercase letters and spaces. The words in \(S\) are separated by exactly one space.

outputFormat

Output the transformed string after applying the specified case adjustments to each word.

sample

apple
ApPlE

</p>